@ckeditor/ckeditor5-real-time-collaboration 46.1.1-alpha.2 → 46.1.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.
Files changed (170) hide show
  1. package/build/real-time-collaboration.js +1 -1
  2. package/dist/index.js +6 -6
  3. package/dist/translations/af.js +1 -1
  4. package/dist/translations/af.umd.js +1 -1
  5. package/dist/translations/ar.js +1 -1
  6. package/dist/translations/ar.umd.js +1 -1
  7. package/dist/translations/ast.js +1 -1
  8. package/dist/translations/ast.umd.js +1 -1
  9. package/dist/translations/az.js +1 -1
  10. package/dist/translations/az.umd.js +1 -1
  11. package/dist/translations/be.js +1 -1
  12. package/dist/translations/be.umd.js +1 -1
  13. package/dist/translations/bg.js +1 -1
  14. package/dist/translations/bg.umd.js +1 -1
  15. package/dist/translations/bn.js +1 -1
  16. package/dist/translations/bn.umd.js +1 -1
  17. package/dist/translations/bs.js +1 -1
  18. package/dist/translations/bs.umd.js +1 -1
  19. package/dist/translations/ca.js +1 -1
  20. package/dist/translations/ca.umd.js +1 -1
  21. package/dist/translations/cs.js +1 -1
  22. package/dist/translations/cs.umd.js +1 -1
  23. package/dist/translations/da.js +1 -1
  24. package/dist/translations/da.umd.js +1 -1
  25. package/dist/translations/de-ch.js +1 -1
  26. package/dist/translations/de-ch.umd.js +1 -1
  27. package/dist/translations/de.js +1 -1
  28. package/dist/translations/de.umd.js +1 -1
  29. package/dist/translations/el.js +1 -1
  30. package/dist/translations/el.umd.js +1 -1
  31. package/dist/translations/en-au.js +1 -1
  32. package/dist/translations/en-au.umd.js +1 -1
  33. package/dist/translations/en-gb.js +1 -1
  34. package/dist/translations/en-gb.umd.js +1 -1
  35. package/dist/translations/en.js +1 -1
  36. package/dist/translations/en.umd.js +1 -1
  37. package/dist/translations/eo.js +1 -1
  38. package/dist/translations/eo.umd.js +1 -1
  39. package/dist/translations/es-co.js +1 -1
  40. package/dist/translations/es-co.umd.js +1 -1
  41. package/dist/translations/es.js +1 -1
  42. package/dist/translations/es.umd.js +1 -1
  43. package/dist/translations/et.js +1 -1
  44. package/dist/translations/et.umd.js +1 -1
  45. package/dist/translations/eu.js +1 -1
  46. package/dist/translations/eu.umd.js +1 -1
  47. package/dist/translations/fa.js +1 -1
  48. package/dist/translations/fa.umd.js +1 -1
  49. package/dist/translations/fi.js +1 -1
  50. package/dist/translations/fi.umd.js +1 -1
  51. package/dist/translations/fr.js +1 -1
  52. package/dist/translations/fr.umd.js +1 -1
  53. package/dist/translations/gl.js +1 -1
  54. package/dist/translations/gl.umd.js +1 -1
  55. package/dist/translations/gu.js +1 -1
  56. package/dist/translations/gu.umd.js +1 -1
  57. package/dist/translations/he.js +1 -1
  58. package/dist/translations/he.umd.js +1 -1
  59. package/dist/translations/hi.js +1 -1
  60. package/dist/translations/hi.umd.js +1 -1
  61. package/dist/translations/hr.js +1 -1
  62. package/dist/translations/hr.umd.js +1 -1
  63. package/dist/translations/hu.js +1 -1
  64. package/dist/translations/hu.umd.js +1 -1
  65. package/dist/translations/hy.js +1 -1
  66. package/dist/translations/hy.umd.js +1 -1
  67. package/dist/translations/id.js +1 -1
  68. package/dist/translations/id.umd.js +1 -1
  69. package/dist/translations/it.js +1 -1
  70. package/dist/translations/it.umd.js +1 -1
  71. package/dist/translations/ja.js +1 -1
  72. package/dist/translations/ja.umd.js +1 -1
  73. package/dist/translations/jv.js +1 -1
  74. package/dist/translations/jv.umd.js +1 -1
  75. package/dist/translations/kk.js +1 -1
  76. package/dist/translations/kk.umd.js +1 -1
  77. package/dist/translations/km.js +1 -1
  78. package/dist/translations/km.umd.js +1 -1
  79. package/dist/translations/kn.js +1 -1
  80. package/dist/translations/kn.umd.js +1 -1
  81. package/dist/translations/ko.js +1 -1
  82. package/dist/translations/ko.umd.js +1 -1
  83. package/dist/translations/ku.js +1 -1
  84. package/dist/translations/ku.umd.js +1 -1
  85. package/dist/translations/lt.js +1 -1
  86. package/dist/translations/lt.umd.js +1 -1
  87. package/dist/translations/lv.js +1 -1
  88. package/dist/translations/lv.umd.js +1 -1
  89. package/dist/translations/ms.js +1 -1
  90. package/dist/translations/ms.umd.js +1 -1
  91. package/dist/translations/nb.js +1 -1
  92. package/dist/translations/nb.umd.js +1 -1
  93. package/dist/translations/ne.js +1 -1
  94. package/dist/translations/ne.umd.js +1 -1
  95. package/dist/translations/nl.js +1 -1
  96. package/dist/translations/nl.umd.js +1 -1
  97. package/dist/translations/no.js +1 -1
  98. package/dist/translations/no.umd.js +1 -1
  99. package/dist/translations/oc.js +1 -1
  100. package/dist/translations/oc.umd.js +1 -1
  101. package/dist/translations/pl.js +1 -1
  102. package/dist/translations/pl.umd.js +1 -1
  103. package/dist/translations/pt-br.js +1 -1
  104. package/dist/translations/pt-br.umd.js +1 -1
  105. package/dist/translations/pt.js +1 -1
  106. package/dist/translations/pt.umd.js +1 -1
  107. package/dist/translations/ro.js +1 -1
  108. package/dist/translations/ro.umd.js +1 -1
  109. package/dist/translations/ru.js +1 -1
  110. package/dist/translations/ru.umd.js +1 -1
  111. package/dist/translations/si.js +1 -1
  112. package/dist/translations/si.umd.js +1 -1
  113. package/dist/translations/sk.js +1 -1
  114. package/dist/translations/sk.umd.js +1 -1
  115. package/dist/translations/sl.js +1 -1
  116. package/dist/translations/sl.umd.js +1 -1
  117. package/dist/translations/sq.js +1 -1
  118. package/dist/translations/sq.umd.js +1 -1
  119. package/dist/translations/sr-latn.js +1 -1
  120. package/dist/translations/sr-latn.umd.js +1 -1
  121. package/dist/translations/sr.js +1 -1
  122. package/dist/translations/sr.umd.js +1 -1
  123. package/dist/translations/sv.js +1 -1
  124. package/dist/translations/sv.umd.js +1 -1
  125. package/dist/translations/th.js +1 -1
  126. package/dist/translations/th.umd.js +1 -1
  127. package/dist/translations/ti.js +1 -1
  128. package/dist/translations/ti.umd.js +1 -1
  129. package/dist/translations/tk.js +1 -1
  130. package/dist/translations/tk.umd.js +1 -1
  131. package/dist/translations/tr.js +1 -1
  132. package/dist/translations/tr.umd.js +1 -1
  133. package/dist/translations/tt.js +1 -1
  134. package/dist/translations/tt.umd.js +1 -1
  135. package/dist/translations/ug.js +1 -1
  136. package/dist/translations/ug.umd.js +1 -1
  137. package/dist/translations/uk.js +1 -1
  138. package/dist/translations/uk.umd.js +1 -1
  139. package/dist/translations/ur.js +1 -1
  140. package/dist/translations/ur.umd.js +1 -1
  141. package/dist/translations/uz.js +1 -1
  142. package/dist/translations/uz.umd.js +1 -1
  143. package/dist/translations/vi.js +1 -1
  144. package/dist/translations/vi.umd.js +1 -1
  145. package/dist/translations/zh-cn.js +1 -1
  146. package/dist/translations/zh-cn.umd.js +1 -1
  147. package/dist/translations/zh.js +1 -1
  148. package/dist/translations/zh.umd.js +1 -1
  149. package/package.json +14 -14
  150. package/src/common-translations.js +1 -1
  151. package/src/index.js +1 -1
  152. package/src/presencelist/presencelistui.js +1 -1
  153. package/src/presencelist/view/presencecounterview.js +1 -1
  154. package/src/presencelist/view/presencedropdownlistitemview.js +1 -1
  155. package/src/presencelist/view/presencedropdownlistview.js +1 -1
  156. package/src/presencelist/view/presenceinlinelistitemview.js +1 -1
  157. package/src/presencelist/view/presenceinlinelistview.js +1 -1
  158. package/src/presencelist/view/presencelistview.js +1 -1
  159. package/src/presencelist.js +1 -1
  160. package/src/realtimecollaborativecomments/cloudservicescommentsadapter.js +2 -2
  161. package/src/realtimecollaborativecomments.js +1 -1
  162. package/src/realtimecollaborativeediting/realtimecollaborationclient.js +2 -2
  163. package/src/realtimecollaborativeediting/sessions.js +1 -1
  164. package/src/realtimecollaborativeediting/usermarkers.js +1 -1
  165. package/src/realtimecollaborativeediting/websocketgateway.js +2 -2
  166. package/src/realtimecollaborativeediting.js +1 -1
  167. package/src/realtimecollaborativerevisionhistory/cloudservicesrevisionhistoryadapter.js +2 -2
  168. package/src/realtimecollaborativerevisionhistory.js +1 -1
  169. package/src/realtimecollaborativetrackchanges/cloudservicestrackchangesadapter.js +2 -2
  170. package/src/realtimecollaborativetrackchanges.js +1 -1
@@ -2,4 +2,4 @@
2
2
  /*!
3
3
  * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
4
4
  * For licensing, see LICENSE.md.
5
- */(()=>{var __webpack_modules__={2:(t,e,n)=>{"use strict";e.Service=n(626)},4:(t,e)=>{"use strict";var n=e;n.length=function(t){var e=t.length;if(!e)return 0;for(var n=0;--e%4>1&&"="===t.charAt(e);)++n;return Math.ceil(3*t.length)/4-n};for(var r=new Array(64),s=new Array(123),o=0;o<64;)s[r[o]=o<26?o+65:o<52?o+71:o<62?o-4:o-59|43]=o++;n.encode=function(t,e,n){for(var s,o=null,i=[],a=0,c=0;e<n;){var u=t[e++];switch(c){case 0:i[a++]=r[u>>2],s=(3&u)<<4,c=1;break;case 1:i[a++]=r[s|u>>4],s=(15&u)<<2,c=2;break;case 2:i[a++]=r[s|u>>6],i[a++]=r[63&u],c=0}a>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,i)),a=0)}return c&&(i[a++]=r[s],i[a++]=61,1===c&&(i[a++]=61)),o?(a&&o.push(String.fromCharCode.apply(String,i.slice(0,a))),o.join("")):String.fromCharCode.apply(String,i.slice(0,a))};var i="invalid encoding";n.decode=function(t,e,n){for(var r,o=n,a=0,c=0;c<t.length;){var u=t.charCodeAt(c++);if(61===u&&a>1)break;if(void 0===(u=s[u]))throw Error(i);switch(a){case 0:r=u,a=1;break;case 1:e[n++]=r<<2|(48&u)>>4,r=u,a=2;break;case 2:e[n++]=(15&r)<<4|(60&u)>>2,r=u,a=3;break;case 3:e[n++]=(3&r)<<6|u,a=0}}if(1===a)throw Error(i);return n-o},n.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}},6:t=>{"use strict";var e=[];function n(t){for(var n=-1,r=0;r<e.length;r++)if(e[r].identifier===t){n=r;break}return n}function r(t,r){for(var o={},i=[],a=0;a<t.length;a++){var c=t[a],u=r.base?c[0]+r.base:c[0],d=o[u]||0,l="".concat(u," ").concat(d);o[u]=d+1;var p=n(l),h={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==p)e[p].references++,e[p].updater(h);else{var f=s(h,r);r.byIndex=a,e.splice(a,0,{identifier:l,updater:f,references:1})}i.push(l)}return i}function s(t,e){var n=e.domAPI(e);n.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,s){var o=r(t=t||[],s=s||{});return function(t){t=t||[];for(var i=0;i<o.length;i++){var a=n(o[i]);e[a].references--}for(var c=r(t,s),u=0;u<o.length;u++){var d=n(o[u]);0===e[d].references&&(e[d].updater(),e.splice(d,1))}o=c}}},39:(t,e,n)=>{"use strict";t.exports=n(779)},63:(t,e,n)=>{"use strict";t.exports=o;var r=n(982);(o.prototype=Object.create(r.prototype)).constructor=o;var s=n(641);function o(){r.call(this)}function i(t,e,n){t.length<40?s.utf8.write(t,e,n):e.utf8Write?e.utf8Write(t,n):e.write(t,n)}o._configure=function(){o.alloc=s._Buffer_allocUnsafe,o.writeBytesBuffer=s.Buffer&&s.Buffer.prototype instanceof Uint8Array&&"set"===s.Buffer.prototype.set.name?function(t,e,n){e.set(t,n)}:function(t,e,n){if(t.copy)t.copy(e,n,0,t.length);else for(var r=0;r<t.length;)e[n++]=t[r++]}},o.prototype.bytes=function(t){s.isString(t)&&(t=s._Buffer_from(t,"base64"));var e=t.length>>>0;return this.uint32(e),e&&this._push(o.writeBytesBuffer,e,t),this},o.prototype.string=function(t){var e=s.Buffer.byteLength(t);return this.uint32(e),e&&this._push(i,e,t),this},o._configure()},117:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(933),s=n.n(r),o=n(718),i=n.n(o)()(s());i.push([t.id,".ck .ck-user__marker-dot{border-radius:50%;cursor:default;display:block;height:var(--ck-user-dot-size);left:50%;position:absolute;top:calc((var(--ck-user-dot-size)/2)*-1);transform:translate(-50%,-50%);width:var(--ck-user-dot-size)}.ck .ck-user__marker-tooltip{color:#fff;display:none;font-family:Georgia,sans-serif;font-size:var(--ck-font-size-base);font-style:normal;font-weight:400;left:0;line-height:1;opacity:0;padding:var(--ck-spacing-small);position:absolute;top:-20px;transition:opacity .2s linear,transform .3s ease-in-out;white-space:nowrap;z-index:99999}@media (prefers-reduced-motion:reduce){.ck .ck-user__marker-tooltip{transition:none}}.ck .ck-user__marker-line{bottom:0;height:100%;position:absolute;width:0}.ck .ck-user__marker{cursor:default;display:inline;position:relative}.ck .ck-user__marker.ck-user__marker_hovered .ck-user__marker-dot{width:0}.ck .ck-user__marker.ck-user__marker_hovered .ck-user__marker-tooltip{animation:fadeInLeft .3s ease-in-out;display:block;opacity:1}.ck .ck-placeholder .ck-user__marker{display:none}@media (prefers-reduced-motion:reduce){.ck .ck-user__marker,.ck .ck-user__marker *,.ck .ck-user__marker:after{animation:none!important}}@keyframes fadeInLeft{0%{opacity:0;transform:translateX(-10px)}to{opacity:1;transform:translateX(0)}}",""]);const a=i},144:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(933),s=n.n(r),o=n(718),i=n.n(o)()(s());i.push([t.id,'.ck.ck-balloon-panel.ck-tooltip{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;z-index:calc(var(--ck-z-dialog) + 100)}:root{--ck-color-presence-list-dropdown-background:#fff;--ck-color-presence-list-dropdown-arrow-border:#ebebeb;--ck-presence-list-dropdown-list-max-width:250px;--ck-presence-list-dropdown-list-min-width:180px;--ck-presence-list-users-tooltip-max-width:120px;--ck-presence-list-users-tooltip-min-width:25px}.ck.ck-presence-list{align-items:center;display:inline-flex;font-size:var(--ck-font-size-base);margin-right:var(--ck-spacing-standard);transition:margin-right .2s ease-in-out}.ck.ck-presence-list *{box-sizing:border-box}.ck.ck-presence-list__list{display:flex;flex-direction:row;justify-content:flex-end;position:relative}.ck.ck-presence-list__list:after{background:transparent;bottom:-15px;content:"";height:15px;left:0;position:absolute;width:100%}.ck.ck-presence-list__counter--hidden{display:none}.ck.ck-presence-list__list-item{background:none;border:1px solid transparent;color:inherit;font:inherit;margin-left:var(--ck-spacing-medium);outline:none;padding:0;position:relative}.ck.ck-presence-list__list-item:focus{border:var(--ck-focus-ring);border-radius:0;box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck-rounded-corners .ck.ck-presence-list__list-item:focus,.ck.ck-presence-list__list-item.ck-rounded-corners:focus{border-radius:var(--ck-border-radius)}.ck.ck-presence-list__list-item .ck-label{height:0;overflow:hidden;width:0}.ck.ck-presence-list__list-item:first-child{margin-left:0}.ck.ck-tooltip.ck-presence-list__list-item__tooltip>.ck-tooltip__text{display:inline-block;max-width:var(--ck-presence-list-users-tooltip-max-width);overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap}.ck.ck-presence-list__marker{display:block;height:3px;margin-top:5px;position:relative;width:100%}.ck-presence-list__balloon button.ck-presence-list__dropdown-list-item *,.ck-presence-list__list button.ck-presence-list__list-item *{cursor:pointer}.ck.ck-presence-list--collapsed .ck-presence-list__list{border:1px solid transparent;min-width:calc(var(--ck-user-avatar-size)*2);padding-left:1px}.ck.ck-presence-list--collapsed .ck-presence-list__list *{cursor:pointer;transition:all .4s ease-in-out}.ck.ck-presence-list--collapsed .ck-presence-list__list:focus{border:var(--ck-focus-ring);border-radius:0;box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck-rounded-corners .ck.ck-presence-list--collapsed .ck-presence-list__list:focus,.ck.ck-presence-list--collapsed .ck-presence-list__list.ck-rounded-corners:focus{border-radius:var(--ck-border-radius)}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item{border:0;margin-left:calc(var(--ck-user-avatar-size)*-.35);padding:0}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item:first-child{margin-left:0}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item:last-child{order:unset}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item .ck-user{--ck-presence-list-avatar-border-color:var(--ck-color-base-foreground);border:2px solid var(--ck-presence-list-avatar-border-color);margin-left:0;margin-right:0}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item.ck-presence-list__users-counter{margin-left:0;margin-right:0}.ck.ck-presence-list__balloon{--ck-color-panel-border:var(--ck-color-presence-list-dropdown-arrow-border);--ck-color-panel-background:var(--ck-color-presence-list-dropdown-background);animation:fadeIn .3s ease-in-out;background-color:var(--ck-color-presence-list-dropdown-background);border:0;opacity:1}@media (prefers-reduced-motion:reduce){.ck.ck-presence-list__balloon{animation:none}}.ck.ck-presence-list__balloon ul{background-color:var(--ck-color-presence-list-dropdown-background)}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-wrapper{border-radius:var(--ck-border-radius);max-width:var(--ck-presence-list-dropdown-list-max-width);min-width:var(--ck-presence-list-dropdown-list-min-width)}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-wrapper.ck-presence-list__dropdown-list-wrapper_scrollable{max-height:80vh;overflow-x:hidden;overflow-y:auto}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-item{align-items:center;background:none;border:0;color:inherit;display:flex;font:inherit;outline:none;padding:var(--ck-spacing-standard);position:relative}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-item:focus{box-shadow:var(--ck-focus-outer-shadow),0 0;outline:var(--ck-focus-ring);outline-offset:-1px;position:relative;z-index:1}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-item:first-of-type .ck-presence-list__marker{border-top-left-radius:var(--ck-border-radius)}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-item:last-of-type .ck-presence-list__marker{border-bottom-left-radius:var(--ck-border-radius)}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list .ck-user__full-name{color:var(--ck-color-base-text);margin-left:var(--ck-spacing-standard);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list .ck.ck-presence-list__marker{height:100%;left:0;margin:0;position:absolute;width:3px}.ck.ck-presence-list__users-counter{--ck-presence-list-counter-border-color:var(--ck-user-avatar-background);--ck-presence-list-counter-background-color:var(--ck-user-avatar-color);align-items:center;background-color:var(--ck-presence-list-counter-background-color);border:2px solid var(--ck-presence-list-counter-border-color);border-radius:50%;box-sizing:border-box;display:flex;height:calc(var(--ck-user-avatar-size) - 4px);justify-content:center;line-height:100%;margin:4px 2px 2px;position:relative;width:calc(var(--ck-user-avatar-size) - 4px)}.ck.ck-presence-list__users-counter__text{--ck-presence-list-counter-text-color:var(--ck-user-avatar-background);color:var(--ck-presence-list-counter-text-color);cursor:default;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}',""]);const a=i},188:t=>{"use strict";t.exports=function(t,e){var n=new Array(arguments.length-1),r=0,s=2,o=!0;for(;s<arguments.length;)n[r++]=arguments[s++];return new Promise(function(s,i){n[r]=function(t){if(o)if(o=!1,t)i(t);else{for(var e=new Array(arguments.length-1),n=0;n<e.length;)e[n++]=arguments[n];s.apply(null,e)}};try{t.apply(e||null,n)}catch(t){o&&(o=!1,i(t))}})}},204:t=>{"use strict";t.exports={}},211:(t,e,n)=>{t.exports=n(312)("./src/collaboration-core.js")},237:t=>{"use strict";t.exports=CKEditor5.dll},290:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},302:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}},311:(t,e,n)=>{t.exports=n(237)("./src/ui.js")},312:t=>{"use strict";t.exports=CKEditor5.collaborationDll},322:(t,e)=>{"use strict";var n=e;n.length=function(t){for(var e=0,n=0,r=0;r<t.length;++r)(n=t.charCodeAt(r))<128?e+=1:n<2048?e+=2:55296==(64512&n)&&56320==(64512&t.charCodeAt(r+1))?(++r,e+=4):e+=3;return e},n.read=function(t,e,n){if(n-e<1)return"";for(var r,s=null,o=[],i=0;e<n;)(r=t[e++])<128?o[i++]=r:r>191&&r<224?o[i++]=(31&r)<<6|63&t[e++]:r>239&&r<365?(r=((7&r)<<18|(63&t[e++])<<12|(63&t[e++])<<6|63&t[e++])-65536,o[i++]=55296+(r>>10),o[i++]=56320+(1023&r)):o[i++]=(15&r)<<12|(63&t[e++])<<6|63&t[e++],i>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,o)),i=0);return s?(i&&s.push(String.fromCharCode.apply(String,o.slice(0,i))),s.join("")):String.fromCharCode.apply(String,o.slice(0,i))},n.write=function(t,e,n){for(var r,s,o=n,i=0;i<t.length;++i)(r=t.charCodeAt(i))<128?e[n++]=r:r<2048?(e[n++]=r>>6|192,e[n++]=63&r|128):55296==(64512&r)&&56320==(64512&(s=t.charCodeAt(i+1)))?(r=65536+((1023&r)<<10)+(1023&s),++i,e[n++]=r>>18|240,e[n++]=r>>12&63|128,e[n++]=r>>6&63|128,e[n++]=63&r|128):(e[n++]=r>>12|224,e[n++]=r>>6&63|128,e[n++]=63&r|128);return n-o}},337:(t,e,n)=>{"use strict";var r=n(995),s=n(682),o=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,i=/[\n\r\t]/g,a=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,c=/:\d+$/,u=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,d=/^[a-zA-Z]:/;function l(t){return(t||"").toString().replace(o,"")}var p=[["#","hash"],["?","query"],function(t,e){return m(e.protocol)?t.replace(/\\/g,"/"):t},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],h={hash:1,query:1};function f(t){var e,r=("undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}).location||{},s={},o=typeof(t=t||r);if("blob:"===t.protocol)s=new g(unescape(t.pathname),{});else if("string"===o)for(e in s=new g(t,{}),h)delete s[e];else if("object"===o){for(e in t)e in h||(s[e]=t[e]);void 0===s.slashes&&(s.slashes=a.test(t.href))}return s}function m(t){return"file:"===t||"ftp:"===t||"http:"===t||"https:"===t||"ws:"===t||"wss:"===t}function y(t,e){t=(t=l(t)).replace(i,""),e=e||{};var n,r=u.exec(t),s=r[1]?r[1].toLowerCase():"",o=!!r[2],a=!!r[3],c=0;return o?a?(n=r[2]+r[3]+r[4],c=r[2].length+r[3].length):(n=r[2]+r[4],c=r[2].length):a?(n=r[3]+r[4],c=r[3].length):n=r[4],"file:"===s?c>=2&&(n=n.slice(2)):m(s)?n=r[4]:s?o&&(n=n.slice(2)):c>=2&&m(e.protocol)&&(n=r[4]),{protocol:s,slashes:o||m(s),slashesCount:c,rest:n}}function g(t,e,n){if(t=(t=l(t)).replace(i,""),!(this instanceof g))return new g(t,e,n);var o,a,c,u,h,b,I=p.slice(),O=typeof e,v=this,w=0;for("object"!==O&&"string"!==O&&(n=e,e=null),n&&"function"!=typeof n&&(n=s.parse),o=!(a=y(t||"",e=f(e))).protocol&&!a.slashes,v.slashes=a.slashes||o&&e.slashes,v.protocol=a.protocol||e.protocol||"",t=a.rest,("file:"===a.protocol&&(2!==a.slashesCount||d.test(t))||!a.slashes&&(a.protocol||a.slashesCount<2||!m(v.protocol)))&&(I[3]=[/(.*)/,"pathname"]);w<I.length;w++)"function"!=typeof(u=I[w])?(c=u[0],b=u[1],c!=c?v[b]=t:"string"==typeof c?~(h="@"===c?t.lastIndexOf(c):t.indexOf(c))&&("number"==typeof u[2]?(v[b]=t.slice(0,h),t=t.slice(h+u[2])):(v[b]=t.slice(h),t=t.slice(0,h))):(h=c.exec(t))&&(v[b]=h[1],t=t.slice(0,h.index)),v[b]=v[b]||o&&u[3]&&e[b]||"",u[4]&&(v[b]=v[b].toLowerCase())):t=u(t,v);n&&(v.query=n(v.query)),o&&e.slashes&&"/"!==v.pathname.charAt(0)&&(""!==v.pathname||""!==e.pathname)&&(v.pathname=function(t,e){if(""===t)return e;for(var n=(e||"/").split("/").slice(0,-1).concat(t.split("/")),r=n.length,s=n[r-1],o=!1,i=0;r--;)"."===n[r]?n.splice(r,1):".."===n[r]?(n.splice(r,1),i++):i&&(0===r&&(o=!0),n.splice(r,1),i--);return o&&n.unshift(""),"."!==s&&".."!==s||n.push(""),n.join("/")}(v.pathname,e.pathname)),"/"!==v.pathname.charAt(0)&&m(v.protocol)&&(v.pathname="/"+v.pathname),r(v.port,v.protocol)||(v.host=v.hostname,v.port=""),v.username=v.password="",v.auth&&(~(h=v.auth.indexOf(":"))?(v.username=v.auth.slice(0,h),v.username=encodeURIComponent(decodeURIComponent(v.username)),v.password=v.auth.slice(h+1),v.password=encodeURIComponent(decodeURIComponent(v.password))):v.username=encodeURIComponent(decodeURIComponent(v.auth)),v.auth=v.password?v.username+":"+v.password:v.username),v.origin="file:"!==v.protocol&&m(v.protocol)&&v.host?v.protocol+"//"+v.host:"null",v.href=v.toString()}g.prototype={set:function(t,e,n){var o=this;switch(t){case"query":"string"==typeof e&&e.length&&(e=(n||s.parse)(e)),o[t]=e;break;case"port":o[t]=e,r(e,o.protocol)?e&&(o.host=o.hostname+":"+e):(o.host=o.hostname,o[t]="");break;case"hostname":o[t]=e,o.port&&(e+=":"+o.port),o.host=e;break;case"host":o[t]=e,c.test(e)?(e=e.split(":"),o.port=e.pop(),o.hostname=e.join(":")):(o.hostname=e,o.port="");break;case"protocol":o.protocol=e.toLowerCase(),o.slashes=!n;break;case"pathname":case"hash":if(e){var i="pathname"===t?"/":"#";o[t]=e.charAt(0)!==i?i+e:e}else o[t]=e;break;case"username":case"password":o[t]=encodeURIComponent(e);break;case"auth":var a=e.indexOf(":");~a?(o.username=e.slice(0,a),o.username=encodeURIComponent(decodeURIComponent(o.username)),o.password=e.slice(a+1),o.password=encodeURIComponent(decodeURIComponent(o.password))):o.username=encodeURIComponent(decodeURIComponent(e))}for(var u=0;u<p.length;u++){var d=p[u];d[4]&&(o[d[1]]=o[d[1]].toLowerCase())}return o.auth=o.password?o.username+":"+o.password:o.username,o.origin="file:"!==o.protocol&&m(o.protocol)&&o.host?o.protocol+"//"+o.host:"null",o.href=o.toString(),o},toString:function(t){t&&"function"==typeof t||(t=s.stringify);var e,n=this,r=n.host,o=n.protocol;o&&":"!==o.charAt(o.length-1)&&(o+=":");var i=o+(n.protocol&&n.slashes||m(n.protocol)?"//":"");return n.username?(i+=n.username,n.password&&(i+=":"+n.password),i+="@"):n.password?(i+=":"+n.password,i+="@"):"file:"!==n.protocol&&m(n.protocol)&&!r&&"/"!==n.pathname&&(i+="@"),(":"===r[r.length-1]||c.test(n.hostname)&&!n.port)&&(r+=":"),i+=r+n.pathname,(e="object"==typeof n.query?t(n.query):n.query)&&(i+="?"!==e.charAt(0)?"?"+e:e),n.hash&&(i+=n.hash),i}},g.extractProtocol=y,g.location=f,g.trimLeft=l,g.qs=s,t.exports=g},338:t=>{"use strict";t.exports=function(t,e,n){var r=n||8192,s=r>>>1,o=null,i=r;return function(n){if(n<1||n>s)return t(n);i+n>r&&(o=t(r),i=0);var a=e.call(o,i,i+=n);return 7&i&&(i=1+(7|i)),a}}},474:(t,e,n)=>{"use strict";t.exports=s;var r=n(641);function s(t,e){this.lo=t>>>0,this.hi=e>>>0}var o=s.zero=new s(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var i=s.zeroHash="\0\0\0\0\0\0\0\0";s.fromNumber=function(t){if(0===t)return o;var e=t<0;e&&(t=-t);var n=t>>>0,r=(t-n)/4294967296>>>0;return e&&(r=~r>>>0,n=~n>>>0,++n>4294967295&&(n=0,++r>4294967295&&(r=0))),new s(n,r)},s.from=function(t){if("number"==typeof t)return s.fromNumber(t);if(r.isString(t)){if(!r.Long)return s.fromNumber(parseInt(t,10));t=r.Long.fromString(t)}return t.low||t.high?new s(t.low>>>0,t.high>>>0):o},s.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var e=1+~this.lo>>>0,n=~this.hi>>>0;return e||(n=n+1>>>0),-(e+4294967296*n)}return this.lo+4294967296*this.hi},s.prototype.toLong=function(t){return r.Long?new r.Long(0|this.lo,0|this.hi,Boolean(t)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(t)}};var a=String.prototype.charCodeAt;s.fromHash=function(t){return t===i?o:new s((a.call(t,0)|a.call(t,1)<<8|a.call(t,2)<<16|a.call(t,3)<<24)>>>0,(a.call(t,4)|a.call(t,5)<<8|a.call(t,6)<<16|a.call(t,7)<<24)>>>0)},s.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},s.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},s.prototype.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},s.prototype.length=function(){var t=this.lo,e=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0===n?0===e?t<16384?t<128?1:2:t<2097152?3:4:e<16384?e<128?5:6:e<2097152?7:8:n<128?9:10}},534:(t,e,n)=>{"use strict";t.exports=c;var r,s=n(641),o=s.LongBits,i=s.utf8;function a(t,e){return RangeError("index out of range: "+t.pos+" + "+(e||1)+" > "+t.len)}function c(t){this.buf=t,this.pos=0,this.len=t.length}var u,d="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new c(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new c(t);throw Error("illegal buffer")},l=function(){return s.Buffer?function(t){return(c.create=function(t){return s.Buffer.isBuffer(t)?new r(t):d(t)})(t)}:d};function p(){var t=new o(0,0),e=0;if(!(this.len-this.pos>4)){for(;e<3;++e){if(this.pos>=this.len)throw a(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*e)>>>0,t}for(;e<4;++e)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t;if(e=0,this.len-this.pos>4){for(;e<5;++e)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}else for(;e<5;++e){if(this.pos>=this.len)throw a(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function h(t,e){return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0}function f(){if(this.pos+8>this.len)throw a(this,8);return new o(h(this.buf,this.pos+=4),h(this.buf,this.pos+=4))}c.create=l(),c.prototype._slice=s.Array.prototype.subarray||s.Array.prototype.slice,c.prototype.uint32=(u=4294967295,function(){if(u=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return u;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return u}),c.prototype.int32=function(){return 0|this.uint32()},c.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)},c.prototype.bool=function(){return 0!==this.uint32()},c.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return h(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|h(this.buf,this.pos+=4)},c.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var t=s.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},c.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var t=s.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},c.prototype.bytes=function(){var t=this.uint32(),e=this.pos,n=this.pos+t;if(n>this.len)throw a(this,t);if(this.pos+=t,Array.isArray(this.buf))return this.buf.slice(e,n);if(e===n){var r=s.Buffer;return r?r.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,e,n)},c.prototype.string=function(){var t=this.bytes();return i.read(t,0,t.length)},c.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw a(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw a(this)}while(128&this.buf[this.pos++]);return this},c.prototype.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(t=7&this.uint32());)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},c._configure=function(t){r=t,c.create=l(),r._configure();var e=s.Long?"toLong":"toNumber";s.merge(c.prototype,{int64:function(){return p.call(this)[e](!1)},uint64:function(){return p.call(this)[e](!0)},sint64:function(){return p.call(this).zzDecode()[e](!1)},fixed64:function(){return f.call(this)[e](!0)},sfixed64:function(){return f.call(this)[e](!1)}})}},557:t=>{"use strict";var e={};t.exports=function(t,n){var r=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},584:(t,e,n)=>{t.exports=n(237)("./src/utils.js")},602:t=>{"use strict";var e,n=(e=[],function(t,n){return e[t]=n,e.filter(Boolean).join("\n")});function r(t,e,r,s){var o;if(r)o="";else{o="",s.supports&&(o+="@supports (".concat(s.supports,") {")),s.media&&(o+="@media ".concat(s.media," {"));var i=void 0!==s.layer;i&&(o+="@layer".concat(s.layer.length>0?" ".concat(s.layer):""," {")),o+=s.css,i&&(o+="}"),s.media&&(o+="}"),s.supports&&(o+="}")}if(t.styleSheet)t.styleSheet.cssText=n(e,o);else{var a=document.createTextNode(o),c=t.childNodes;c[e]&&t.removeChild(c[e]),c.length?t.insertBefore(a,c[e]):t.appendChild(a)}}var s={singleton:null,singletonCounter:0};t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=s.singletonCounter++,n=s.singleton||(s.singleton=t.insertStyleElement(t));return{update:function(t){r(n,e,!1,t)},remove:function(t){r(n,e,!0,t)}}}},626:(t,e,n)=>{"use strict";t.exports=s;var r=n(641);function s(t,e,n){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");r.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=Boolean(e),this.responseDelimited=Boolean(n)}(s.prototype=Object.create(r.EventEmitter.prototype)).constructor=s,s.prototype.rpcCall=function t(e,n,s,o,i){if(!o)throw TypeError("request must be specified");var a=this;if(!i)return r.asPromise(t,a,e,n,s,o);if(a.rpcImpl)try{return a.rpcImpl(e,n[a.requestDelimited?"encodeDelimited":"encode"](o).finish(),function(t,n){if(t)return a.emit("error",t,e),i(t);if(null!==n){if(!(n instanceof s))try{n=s[a.responseDelimited?"decodeDelimited":"decode"](n)}catch(t){return a.emit("error",t,e),i(t)}return a.emit("data",n,e),i(null,n)}a.end(!0)})}catch(t){return a.emit("error",t,e),void setTimeout(function(){i(t)},0)}else setTimeout(function(){i(Error("already ended"))},0)},s.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},641:function(t,e,n){"use strict";var r=e;function s(t,e,n){for(var r=Object.keys(e),s=0;s<r.length;++s)void 0!==t[r[s]]&&n||(t[r[s]]=e[r[s]]);return t}function o(t){function e(t,n){if(!(this instanceof e))return new e(t,n);Object.defineProperty(this,"message",{get:function(){return t}}),Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),n&&s(this,n)}return e.prototype=Object.create(Error.prototype,{constructor:{value:e,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return t},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),e}r.asPromise=n(188),r.base64=n(4),r.EventEmitter=n(730),r.float=n(791),r.inquire=n(706),r.utf8=n(322),r.pool=n(338),r.LongBits=n(474),r.isNode=Boolean(void 0!==n.g&&n.g&&n.g.process&&n.g.process.versions&&n.g.process.versions.node),r.global=r.isNode&&n.g||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,r.emptyArray=Object.freeze?Object.freeze([]):[],r.emptyObject=Object.freeze?Object.freeze({}):{},r.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},r.isString=function(t){return"string"==typeof t||t instanceof String},r.isObject=function(t){return t&&"object"==typeof t},r.isset=r.isSet=function(t,e){var n=t[e];return!(null==n||!t.hasOwnProperty(e))&&("object"!=typeof n||(Array.isArray(n)?n.length:Object.keys(n).length)>0)},r.Buffer=function(){try{var t=r.inquire("buffer").Buffer;return t.prototype.utf8Write?t:null}catch(t){return null}}(),r._Buffer_from=null,r._Buffer_allocUnsafe=null,r.newBuffer=function(t){return"number"==typeof t?r.Buffer?r._Buffer_allocUnsafe(t):new r.Array(t):r.Buffer?r._Buffer_from(t):"undefined"==typeof Uint8Array?t:new Uint8Array(t)},r.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||r.inquire("long"),r.key2Re=/^true|false|0|1$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(t){return t?r.LongBits.from(t).toHash():r.LongBits.zeroHash},r.longFromHash=function(t,e){var n=r.LongBits.fromHash(t);return r.Long?r.Long.fromBits(n.lo,n.hi,e):n.toNumber(Boolean(e))},r.merge=s,r.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)},r.newError=o,r.ProtocolError=o("ProtocolError"),r.oneOfGetter=function(t){for(var e={},n=0;n<t.length;++n)e[t[n]]=1;return function(){for(var t=Object.keys(this),n=t.length-1;n>-1;--n)if(1===e[t[n]]&&void 0!==this[t[n]]&&null!==this[t[n]])return t[n]}},r.oneOfSetter=function(t){return function(e){for(var n=0;n<t.length;++n)t[n]!==e&&delete this[t[n]]}},r.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},r._configure=function(){var t=r.Buffer;t?(r._Buffer_from=t.from!==Uint8Array.from&&t.from||function(e,n){return new t(e,n)},r._Buffer_allocUnsafe=t.allocUnsafe||function(e){return new t(e)}):r._Buffer_from=r._Buffer_allocUnsafe=null}},682:(t,e)=>{"use strict";var n=Object.prototype.hasOwnProperty;function r(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}function s(t){try{return encodeURIComponent(t)}catch(t){return null}}e.stringify=function(t,e){e=e||"";var r,o,i=[];for(o in"string"!=typeof e&&(e="?"),t)if(n.call(t,o)){if((r=t[o])||null!=r&&!isNaN(r)||(r=""),o=s(o),r=s(r),null===o||null===r)continue;i.push(o+"="+r)}return i.length?e+i.join("&"):""},e.parse=function(t){for(var e,n=/([^=?#&]+)=?([^&]*)/g,s={};e=n.exec(t);){var o=r(e[1]),i=r(e[2]);null===o||null===i||o in s||(s[o]=i)}return s}},706:module=>{"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(t){}return null}module.exports=inquire},718:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n}).join("")},e.i=function(t,n,r,s,o){"string"==typeof t&&(t=[[null,t,void 0]]);var i={};if(r)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(i[c]=!0)}for(var u=0;u<t.length;u++){var d=[].concat(t[u]);r&&i[d[0]]||(void 0!==o&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=o),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),s&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=s):d[4]="".concat(s)),e.push(d))}},e}},730:t=>{"use strict";function e(){this._listeners={}}t.exports=e,e.prototype.on=function(t,e,n){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:e,ctx:n||this}),this},e.prototype.off=function(t,e){if(void 0===t)this._listeners={};else if(void 0===e)this._listeners[t]=[];else for(var n=this._listeners[t],r=0;r<n.length;)n[r].fn===e?n.splice(r,1):++r;return this},e.prototype.emit=function(t){var e=this._listeners[t];if(e){for(var n=[],r=1;r<arguments.length;)n.push(arguments[r++]);for(r=0;r<e.length;)e[r].fn.apply(e[r++].ctx,n)}return this}},779:(t,e,n)=>{"use strict";var r=e;function s(){r.util._configure(),r.Writer._configure(r.BufferWriter),r.Reader._configure(r.BufferReader)}r.build="minimal",r.Writer=n(982),r.BufferWriter=n(63),r.Reader=n(534),r.BufferReader=n(799),r.util=n(641),r.rpc=n(2),r.roots=n(204),r.configure=s,s()},782:(t,e,n)=>{t.exports=n(237)("./src/core.js")},783:(t,e,n)=>{t.exports=n(237)("./src/engine.js")},791:t=>{"use strict";function e(t){return"undefined"!=typeof Float32Array?function(){var e=new Float32Array([-0]),n=new Uint8Array(e.buffer),r=128===n[3];function s(t,r,s){e[0]=t,r[s]=n[0],r[s+1]=n[1],r[s+2]=n[2],r[s+3]=n[3]}function o(t,r,s){e[0]=t,r[s]=n[3],r[s+1]=n[2],r[s+2]=n[1],r[s+3]=n[0]}function i(t,r){return n[0]=t[r],n[1]=t[r+1],n[2]=t[r+2],n[3]=t[r+3],e[0]}function a(t,r){return n[3]=t[r],n[2]=t[r+1],n[1]=t[r+2],n[0]=t[r+3],e[0]}t.writeFloatLE=r?s:o,t.writeFloatBE=r?o:s,t.readFloatLE=r?i:a,t.readFloatBE=r?a:i}():function(){function e(t,e,n,r){var s=e<0?1:0;if(s&&(e=-e),0===e)t(1/e>0?0:2147483648,n,r);else if(isNaN(e))t(2143289344,n,r);else if(e>34028234663852886e22)t((s<<31|2139095040)>>>0,n,r);else if(e<11754943508222875e-54)t((s<<31|Math.round(e/1401298464324817e-60))>>>0,n,r);else{var o=Math.floor(Math.log(e)/Math.LN2);t((s<<31|o+127<<23|8388607&Math.round(e*Math.pow(2,-o)*8388608))>>>0,n,r)}}function i(t,e,n){var r=t(e,n),s=2*(r>>31)+1,o=r>>>23&255,i=8388607&r;return 255===o?i?NaN:s*(1/0):0===o?1401298464324817e-60*s*i:s*Math.pow(2,o-150)*(i+8388608)}t.writeFloatLE=e.bind(null,n),t.writeFloatBE=e.bind(null,r),t.readFloatLE=i.bind(null,s),t.readFloatBE=i.bind(null,o)}(),"undefined"!=typeof Float64Array?function(){var e=new Float64Array([-0]),n=new Uint8Array(e.buffer),r=128===n[7];function s(t,r,s){e[0]=t,r[s]=n[0],r[s+1]=n[1],r[s+2]=n[2],r[s+3]=n[3],r[s+4]=n[4],r[s+5]=n[5],r[s+6]=n[6],r[s+7]=n[7]}function o(t,r,s){e[0]=t,r[s]=n[7],r[s+1]=n[6],r[s+2]=n[5],r[s+3]=n[4],r[s+4]=n[3],r[s+5]=n[2],r[s+6]=n[1],r[s+7]=n[0]}function i(t,r){return n[0]=t[r],n[1]=t[r+1],n[2]=t[r+2],n[3]=t[r+3],n[4]=t[r+4],n[5]=t[r+5],n[6]=t[r+6],n[7]=t[r+7],e[0]}function a(t,r){return n[7]=t[r],n[6]=t[r+1],n[5]=t[r+2],n[4]=t[r+3],n[3]=t[r+4],n[2]=t[r+5],n[1]=t[r+6],n[0]=t[r+7],e[0]}t.writeDoubleLE=r?s:o,t.writeDoubleBE=r?o:s,t.readDoubleLE=r?i:a,t.readDoubleBE=r?a:i}():function(){function e(t,e,n,r,s,o){var i=r<0?1:0;if(i&&(r=-r),0===r)t(0,s,o+e),t(1/r>0?0:2147483648,s,o+n);else if(isNaN(r))t(0,s,o+e),t(2146959360,s,o+n);else if(r>17976931348623157e292)t(0,s,o+e),t((i<<31|2146435072)>>>0,s,o+n);else{var a;if(r<22250738585072014e-324)t((a=r/5e-324)>>>0,s,o+e),t((i<<31|a/4294967296)>>>0,s,o+n);else{var c=Math.floor(Math.log(r)/Math.LN2);1024===c&&(c=1023),t(4503599627370496*(a=r*Math.pow(2,-c))>>>0,s,o+e),t((i<<31|c+1023<<20|1048576*a&1048575)>>>0,s,o+n)}}}function i(t,e,n,r,s){var o=t(r,s+e),i=t(r,s+n),a=2*(i>>31)+1,c=i>>>20&2047,u=4294967296*(1048575&i)+o;return 2047===c?u?NaN:a*(1/0):0===c?5e-324*a*u:a*Math.pow(2,c-1075)*(u+4503599627370496)}t.writeDoubleLE=e.bind(null,n,0,4),t.writeDoubleBE=e.bind(null,r,4,0),t.readDoubleLE=i.bind(null,s,0,4),t.readDoubleBE=i.bind(null,o,4,0)}(),t}function n(t,e,n){e[n]=255&t,e[n+1]=t>>>8&255,e[n+2]=t>>>16&255,e[n+3]=t>>>24}function r(t,e,n){e[n]=t>>>24,e[n+1]=t>>>16&255,e[n+2]=t>>>8&255,e[n+3]=255&t}function s(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0}function o(t,e){return(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}t.exports=e(e)},799:(t,e,n)=>{"use strict";t.exports=o;var r=n(534);(o.prototype=Object.create(r.prototype)).constructor=o;var s=n(641);function o(t){r.call(this,t)}o._configure=function(){s.Buffer&&(o.prototype._slice=s.Buffer.prototype.slice)},o.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))},o._configure()},933:t=>{"use strict";t.exports=function(t){return t[1]}},982:(t,e,n)=>{"use strict";t.exports=l;var r,s=n(641),o=s.LongBits,i=s.base64,a=s.utf8;function c(t,e,n){this.fn=t,this.len=e,this.next=void 0,this.val=n}function u(){}function d(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function l(){this.len=0,this.head=new c(u,0,0),this.tail=this.head,this.states=null}var p=function(){return s.Buffer?function(){return(l.create=function(){return new r})()}:function(){return new l}};function h(t,e,n){e[n]=255&t}function f(t,e){this.len=t,this.next=void 0,this.val=e}function m(t,e,n){for(;t.hi;)e[n++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)e[n++]=127&t.lo|128,t.lo=t.lo>>>7;e[n++]=t.lo}function y(t,e,n){e[n]=255&t,e[n+1]=t>>>8&255,e[n+2]=t>>>16&255,e[n+3]=t>>>24}l.create=p(),l.alloc=function(t){return new s.Array(t)},s.Array!==Array&&(l.alloc=s.pool(l.alloc,s.Array.prototype.subarray)),l.prototype._push=function(t,e,n){return this.tail=this.tail.next=new c(t,e,n),this.len+=e,this},f.prototype=Object.create(c.prototype),f.prototype.fn=function(t,e,n){for(;t>127;)e[n++]=127&t|128,t>>>=7;e[n]=t},l.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new f((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},l.prototype.int32=function(t){return t<0?this._push(m,10,o.fromNumber(t)):this.uint32(t)},l.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},l.prototype.uint64=function(t){var e=o.from(t);return this._push(m,e.length(),e)},l.prototype.int64=l.prototype.uint64,l.prototype.sint64=function(t){var e=o.from(t).zzEncode();return this._push(m,e.length(),e)},l.prototype.bool=function(t){return this._push(h,1,t?1:0)},l.prototype.fixed32=function(t){return this._push(y,4,t>>>0)},l.prototype.sfixed32=l.prototype.fixed32,l.prototype.fixed64=function(t){var e=o.from(t);return this._push(y,4,e.lo)._push(y,4,e.hi)},l.prototype.sfixed64=l.prototype.fixed64,l.prototype.float=function(t){return this._push(s.float.writeFloatLE,4,t)},l.prototype.double=function(t){return this._push(s.float.writeDoubleLE,8,t)};var g=s.Array.prototype.set?function(t,e,n){e.set(t,n)}:function(t,e,n){for(var r=0;r<t.length;++r)e[n+r]=t[r]};l.prototype.bytes=function(t){var e=t.length>>>0;if(!e)return this._push(h,1,0);if(s.isString(t)){var n=l.alloc(e=i.length(t));i.decode(t,n,0),t=n}return this.uint32(e)._push(g,e,t)},l.prototype.string=function(t){var e=a.length(t);return e?this.uint32(e)._push(a.write,e,t):this._push(h,1,0)},l.prototype.fork=function(){return this.states=new d(this),this.head=this.tail=new c(u,0,0),this.len=0,this},l.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new c(u,0,0),this.len=0),this},l.prototype.ldelim=function(){var t=this.head,e=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=t.next,this.tail=e,this.len+=n),this},l.prototype.finish=function(){for(var t=this.head.next,e=this.constructor.alloc(this.len),n=0;t;)t.fn(t.val,e,n),n+=t.len,t=t.next;return e},l._configure=function(t){r=t,l.create=p(),r._configure()}},995:t=>{"use strict";t.exports=function(t,e){if(e=e.split(":")[0],!(t=+t))return!1;switch(e){case"http":case"ws":return 80!==t;case"https":case"wss":return 443!==t;case"ftp":return 21!==t;case"gopher":return 70!==t;case"file":return!1}return 0!==t}}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var n=__webpack_module_cache__[t]={id:t,exports:{}};return __webpack_modules__[t].call(n.exports,n,n.exports,__webpack_require__),n.exports}__webpack_require__.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return __webpack_require__.d(e,{a:e}),e},__webpack_require__.d=(t,e)=>{for(var n in e)__webpack_require__.o(e,n)&&!__webpack_require__.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),__webpack_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),__webpack_require__.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var __webpack_exports__={};(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{CloudServicesCommentsAdapter:()=>wo,CloudServicesRevisionHistoryAdapter:()=>Go,CloudServicesTrackChangesAdapter:()=>Po,PresenceList:()=>xi,PresenceListUI:()=>Pi,RealTimeCollaborationClient:()=>po,RealTimeCollaborativeComments:()=>Vo,RealTimeCollaborativeEditing:()=>Io,RealTimeCollaborativeRevisionHistory:()=>Wo,RealTimeCollaborativeTrackChanges:()=>Uo,Sessions:()=>Qn,WebSocketGateway:()=>Hn});var t={};__webpack_require__.r(t),__webpack_require__.d(t,{Decoder:()=>Dt,Encoder:()=>Et,PacketType:()=>Pt,protocol:()=>Ct});var e=__webpack_require__(782),n=__webpack_require__(584),r=__webpack_require__(311),s=__webpack_require__(783);class o{static DESCRIPTOR_NAME;static DESCRIPTOR;constructor(...t){}}class i extends o{static TYPE="1000";static READABLE_TYPE_NAME;constructor(...t){super()}static fromJSON(t){throw new TypeError("Must be implemented in a child class!")}}class a extends i{id;static TYPE="21";static READABLE_TYPE_NAME="getUser";static DESCRIPTOR_NAME="GetUserMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1}}};constructor(t){super(),this.id=t}toJSON(){return{id:this.id}}static fromJSON(t){return new a(t.id)}}class c extends i{attributes;static DESCRIPTOR_NAME="GetUserResponse";static DESCRIPTOR={fields:{attributes:{rule:"repeated",type:"KeyValueDescriptor",id:1}}};constructor(t){super(),this.attributes=t}toJSON(){return{attributes:Object.keys(this.attributes).map(t=>({key:t,value:JSON.stringify(this.attributes[t])}))}}static fromJSON(t){const e=t.attributes.reduce((t,e)=>(t[e.key]=e.value?JSON.parse(e.value):null,t),{});return new c(e)}}var u=__webpack_require__(39);const d=(()=>{var t=u.Reader,e=u.Writer,n=u.util,r=u.roots.default||(u.roots.default={});return r.OperationMetadataDescriptor=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.userId="",s.prototype.type="",s.prototype.createdAt="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.userId&&Object.hasOwnProperty.call(t,"userId")&&n.uint32(10).string(t.userId),null!=t.type&&Object.hasOwnProperty.call(t,"type")&&n.uint32(18).string(t.type),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(26).string(t.createdAt),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.OperationMetadataDescriptor;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.userId=e.string();break;case 2:i.type=e.string();break;case 3:i.createdAt=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.userId&&t.hasOwnProperty("userId")&&!n.isString(t.userId)?"userId: string expected":null!=t.type&&t.hasOwnProperty("type")&&!n.isString(t.type)?"type: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null},s.fromObject=function(t){if(t instanceof r.OperationMetadataDescriptor)return t;var e=new r.OperationMetadataDescriptor;return null!=t.userId&&(e.userId=String(t.userId)),null!=t.type&&(e.type=String(t.type)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.userId="",n.type="",n.createdAt=""),null!=t.userId&&t.hasOwnProperty("userId")&&(n.userId=t.userId),null!=t.type&&t.hasOwnProperty("type")&&(n.type=t.type),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/OperationMetadataDescriptor"},s}(),r.CollaborativeEditingConnectMessage=function(){function s(t){if(this.buffers=[],this.types=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.bundleVersion="",s.prototype.buffers=n.emptyArray,s.prototype.types=n.emptyArray,s.prototype.lastOperationId="",s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.bundleVersion&&Object.hasOwnProperty.call(t,"bundleVersion")&&n.uint32(18).string(t.bundleVersion),null!=t.buffers&&t.buffers.length)for(var r=0;r<t.buffers.length;++r)n.uint32(26).bytes(t.buffers[r]);if(null!=t.types&&t.types.length){for(n.uint32(34).fork(),r=0;r<t.types.length;++r)n.uint32(t.types[r]);n.ldelim()}return null!=t.lastOperationId&&Object.hasOwnProperty.call(t,"lastOperationId")&&n.uint32(42).string(t.lastOperationId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CollaborativeEditingConnectMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.bundleVersion=e.string();break;case 3:i.buffers&&i.buffers.length||(i.buffers=[]),i.buffers.push(e.bytes());break;case 4:if(i.types&&i.types.length||(i.types=[]),2==(7&a))for(var c=e.uint32()+e.pos;e.pos<c;)i.types.push(e.uint32());else i.types.push(e.uint32());break;case 5:i.lastOperationId=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id))return"id: string expected";if(null!=t.bundleVersion&&t.hasOwnProperty("bundleVersion")&&!n.isString(t.bundleVersion))return"bundleVersion: string expected";if(null!=t.buffers&&t.hasOwnProperty("buffers")){if(!Array.isArray(t.buffers))return"buffers: array expected";for(var e=0;e<t.buffers.length;++e)if(!(t.buffers[e]&&"number"==typeof t.buffers[e].length||n.isString(t.buffers[e])))return"buffers: buffer[] expected"}if(null!=t.types&&t.hasOwnProperty("types")){if(!Array.isArray(t.types))return"types: array expected";for(e=0;e<t.types.length;++e)if(!n.isInteger(t.types[e]))return"types: integer[] expected"}return null!=t.lastOperationId&&t.hasOwnProperty("lastOperationId")&&!n.isString(t.lastOperationId)?"lastOperationId: string expected":null},s.fromObject=function(t){if(t instanceof r.CollaborativeEditingConnectMessage)return t;var e=new r.CollaborativeEditingConnectMessage;if(null!=t.id&&(e.id=String(t.id)),null!=t.bundleVersion&&(e.bundleVersion=String(t.bundleVersion)),t.buffers){if(!Array.isArray(t.buffers))throw TypeError(".CollaborativeEditingConnectMessage.buffers: array expected");e.buffers=[];for(var s=0;s<t.buffers.length;++s)"string"==typeof t.buffers[s]?n.base64.decode(t.buffers[s],e.buffers[s]=n.newBuffer(n.base64.length(t.buffers[s])),0):t.buffers[s].length>=0&&(e.buffers[s]=t.buffers[s])}if(t.types){if(!Array.isArray(t.types))throw TypeError(".CollaborativeEditingConnectMessage.types: array expected");for(e.types=[],s=0;s<t.types.length;++s)e.types[s]=t.types[s]>>>0}return null!=t.lastOperationId&&(e.lastOperationId=String(t.lastOperationId)),e},s.toObject=function(t,e){e||(e={});var r={};if((e.arrays||e.defaults)&&(r.buffers=[],r.types=[]),e.defaults&&(r.id="",r.bundleVersion="",r.lastOperationId=""),null!=t.id&&t.hasOwnProperty("id")&&(r.id=t.id),null!=t.bundleVersion&&t.hasOwnProperty("bundleVersion")&&(r.bundleVersion=t.bundleVersion),t.buffers&&t.buffers.length){r.buffers=[];for(var s=0;s<t.buffers.length;++s)r.buffers[s]=e.bytes===String?n.base64.encode(t.buffers[s],0,t.buffers[s].length):e.bytes===Array?Array.prototype.slice.call(t.buffers[s]):t.buffers[s]}if(t.types&&t.types.length)for(r.types=[],s=0;s<t.types.length;++s)r.types[s]=t.types[s];return null!=t.lastOperationId&&t.hasOwnProperty("lastOperationId")&&(r.lastOperationId=t.lastOperationId),r},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CollaborativeEditingConnectMessage"},s}(),r.CollaborativeEditingReconnectMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.bundleVersion="",s.prototype.lastKnowVersion=0,s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.bundleVersion&&Object.hasOwnProperty.call(t,"bundleVersion")&&n.uint32(18).string(t.bundleVersion),null!=t.lastKnowVersion&&Object.hasOwnProperty.call(t,"lastKnowVersion")&&n.uint32(24).uint32(t.lastKnowVersion),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CollaborativeEditingReconnectMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.bundleVersion=e.string();break;case 3:i.lastKnowVersion=e.uint32();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id)?"id: string expected":null!=t.bundleVersion&&t.hasOwnProperty("bundleVersion")&&!n.isString(t.bundleVersion)?"bundleVersion: string expected":null!=t.lastKnowVersion&&t.hasOwnProperty("lastKnowVersion")&&!n.isInteger(t.lastKnowVersion)?"lastKnowVersion: integer expected":null},s.fromObject=function(t){if(t instanceof r.CollaborativeEditingReconnectMessage)return t;var e=new r.CollaborativeEditingReconnectMessage;return null!=t.id&&(e.id=String(t.id)),null!=t.bundleVersion&&(e.bundleVersion=String(t.bundleVersion)),null!=t.lastKnowVersion&&(e.lastKnowVersion=t.lastKnowVersion>>>0),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.id="",n.bundleVersion="",n.lastKnowVersion=0),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),null!=t.bundleVersion&&t.hasOwnProperty("bundleVersion")&&(n.bundleVersion=t.bundleVersion),null!=t.lastKnowVersion&&t.hasOwnProperty("lastKnowVersion")&&(n.lastKnowVersion=t.lastKnowVersion),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CollaborativeEditingReconnectMessage"},s}(),r.CollaborativeEditingUpdateMessage=function(){function s(t){if(this.buffers=[],this.types=[],this.metadata=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.baseVersion=0,s.prototype.buffers=n.emptyArray,s.prototype.types=n.emptyArray,s.prototype.metadata=n.emptyArray,s.prototype.lastOperationId="",s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.baseVersion&&Object.hasOwnProperty.call(t,"baseVersion")&&n.uint32(16).uint32(t.baseVersion),null!=t.buffers&&t.buffers.length)for(var s=0;s<t.buffers.length;++s)n.uint32(26).bytes(t.buffers[s]);if(null!=t.types&&t.types.length){for(n.uint32(34).fork(),s=0;s<t.types.length;++s)n.uint32(t.types[s]);n.ldelim()}if(null!=t.metadata&&t.metadata.length)for(s=0;s<t.metadata.length;++s)r.OperationMetadataDescriptor.encode(t.metadata[s],n.uint32(50).fork()).ldelim();return null!=t.lastOperationId&&Object.hasOwnProperty.call(t,"lastOperationId")&&n.uint32(58).string(t.lastOperationId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CollaborativeEditingUpdateMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.baseVersion=e.uint32();break;case 3:i.buffers&&i.buffers.length||(i.buffers=[]),i.buffers.push(e.bytes());break;case 4:if(i.types&&i.types.length||(i.types=[]),2==(7&a))for(var c=e.uint32()+e.pos;e.pos<c;)i.types.push(e.uint32());else i.types.push(e.uint32());break;case 6:i.metadata&&i.metadata.length||(i.metadata=[]),i.metadata.push(r.OperationMetadataDescriptor.decode(e,e.uint32()));break;case 7:i.lastOperationId=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id))return"id: string expected";if(null!=t.baseVersion&&t.hasOwnProperty("baseVersion")&&!n.isInteger(t.baseVersion))return"baseVersion: integer expected";if(null!=t.buffers&&t.hasOwnProperty("buffers")){if(!Array.isArray(t.buffers))return"buffers: array expected";for(var e=0;e<t.buffers.length;++e)if(!(t.buffers[e]&&"number"==typeof t.buffers[e].length||n.isString(t.buffers[e])))return"buffers: buffer[] expected"}if(null!=t.types&&t.hasOwnProperty("types")){if(!Array.isArray(t.types))return"types: array expected";for(e=0;e<t.types.length;++e)if(!n.isInteger(t.types[e]))return"types: integer[] expected"}if(null!=t.metadata&&t.hasOwnProperty("metadata")){if(!Array.isArray(t.metadata))return"metadata: array expected";for(e=0;e<t.metadata.length;++e){var s=r.OperationMetadataDescriptor.verify(t.metadata[e]);if(s)return"metadata."+s}}return null!=t.lastOperationId&&t.hasOwnProperty("lastOperationId")&&!n.isString(t.lastOperationId)?"lastOperationId: string expected":null},s.fromObject=function(t){if(t instanceof r.CollaborativeEditingUpdateMessage)return t;var e=new r.CollaborativeEditingUpdateMessage;if(null!=t.id&&(e.id=String(t.id)),null!=t.baseVersion&&(e.baseVersion=t.baseVersion>>>0),t.buffers){if(!Array.isArray(t.buffers))throw TypeError(".CollaborativeEditingUpdateMessage.buffers: array expected");e.buffers=[];for(var s=0;s<t.buffers.length;++s)"string"==typeof t.buffers[s]?n.base64.decode(t.buffers[s],e.buffers[s]=n.newBuffer(n.base64.length(t.buffers[s])),0):t.buffers[s].length>=0&&(e.buffers[s]=t.buffers[s])}if(t.types){if(!Array.isArray(t.types))throw TypeError(".CollaborativeEditingUpdateMessage.types: array expected");for(e.types=[],s=0;s<t.types.length;++s)e.types[s]=t.types[s]>>>0}if(t.metadata){if(!Array.isArray(t.metadata))throw TypeError(".CollaborativeEditingUpdateMessage.metadata: array expected");for(e.metadata=[],s=0;s<t.metadata.length;++s){if("object"!=typeof t.metadata[s])throw TypeError(".CollaborativeEditingUpdateMessage.metadata: object expected");e.metadata[s]=r.OperationMetadataDescriptor.fromObject(t.metadata[s])}}return null!=t.lastOperationId&&(e.lastOperationId=String(t.lastOperationId)),e},s.toObject=function(t,e){e||(e={});var s={};if((e.arrays||e.defaults)&&(s.buffers=[],s.types=[],s.metadata=[]),e.defaults&&(s.id="",s.baseVersion=0,s.lastOperationId=""),null!=t.id&&t.hasOwnProperty("id")&&(s.id=t.id),null!=t.baseVersion&&t.hasOwnProperty("baseVersion")&&(s.baseVersion=t.baseVersion),t.buffers&&t.buffers.length){s.buffers=[];for(var o=0;o<t.buffers.length;++o)s.buffers[o]=e.bytes===String?n.base64.encode(t.buffers[o],0,t.buffers[o].length):e.bytes===Array?Array.prototype.slice.call(t.buffers[o]):t.buffers[o]}if(t.types&&t.types.length)for(s.types=[],o=0;o<t.types.length;++o)s.types[o]=t.types[o];if(t.metadata&&t.metadata.length)for(s.metadata=[],o=0;o<t.metadata.length;++o)s.metadata[o]=r.OperationMetadataDescriptor.toObject(t.metadata[o],e);return null!=t.lastOperationId&&t.hasOwnProperty("lastOperationId")&&(s.lastOperationId=t.lastOperationId),s},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CollaborativeEditingUpdateMessage"},s}(),r.GetDocumentDetailsMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.documentId="",s.prototype.environmentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(10).string(t.documentId),null!=t.environmentId&&Object.hasOwnProperty.call(t,"environmentId")&&n.uint32(18).string(t.environmentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.GetDocumentDetailsMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.documentId=e.string();break;case 2:i.environmentId=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null!=t.environmentId&&t.hasOwnProperty("environmentId")&&!n.isString(t.environmentId)?"environmentId: string expected":null},s.fromObject=function(t){if(t instanceof r.GetDocumentDetailsMessage)return t;var e=new r.GetDocumentDetailsMessage;return null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.environmentId&&(e.environmentId=String(t.environmentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.documentId="",n.environmentId=""),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.environmentId&&t.hasOwnProperty("environmentId")&&(n.environmentId=t.environmentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/GetDocumentDetailsMessage"},s}(),r.CollaborativeEditingConnectResponse=function(){function s(t){if(this.buffers=[],this.types=[],this.metadata=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.channel="",s.prototype.offset=0,s.prototype.version=0,s.prototype.buffers=n.emptyArray,s.prototype.types=n.emptyArray,s.prototype.metadata=n.emptyArray,s.prototype.initData="",s.prototype.isInitialized=!1,s.prototype.sessionId="",s.prototype.lastOperationId="",s.prototype.sessionCreatedAt="",s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.channel&&Object.hasOwnProperty.call(t,"channel")&&n.uint32(10).string(t.channel),null!=t.offset&&Object.hasOwnProperty.call(t,"offset")&&n.uint32(16).uint32(t.offset),null!=t.version&&Object.hasOwnProperty.call(t,"version")&&n.uint32(24).uint32(t.version),null!=t.buffers&&t.buffers.length)for(var s=0;s<t.buffers.length;++s)n.uint32(34).bytes(t.buffers[s]);if(null!=t.types&&t.types.length){for(n.uint32(42).fork(),s=0;s<t.types.length;++s)n.uint32(t.types[s]);n.ldelim()}if(null!=t.metadata&&t.metadata.length)for(s=0;s<t.metadata.length;++s)r.OperationMetadataDescriptor.encode(t.metadata[s],n.uint32(58).fork()).ldelim();return null!=t.initData&&Object.hasOwnProperty.call(t,"initData")&&n.uint32(66).string(t.initData),null!=t.isInitialized&&Object.hasOwnProperty.call(t,"isInitialized")&&n.uint32(72).bool(t.isInitialized),null!=t.sessionId&&Object.hasOwnProperty.call(t,"sessionId")&&n.uint32(82).string(t.sessionId),null!=t.lastOperationId&&Object.hasOwnProperty.call(t,"lastOperationId")&&n.uint32(90).string(t.lastOperationId),null!=t.sessionCreatedAt&&Object.hasOwnProperty.call(t,"sessionCreatedAt")&&n.uint32(98).string(t.sessionCreatedAt),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CollaborativeEditingConnectResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.channel=e.string();break;case 2:i.offset=e.uint32();break;case 3:i.version=e.uint32();break;case 4:i.buffers&&i.buffers.length||(i.buffers=[]),i.buffers.push(e.bytes());break;case 5:if(i.types&&i.types.length||(i.types=[]),2==(7&a))for(var c=e.uint32()+e.pos;e.pos<c;)i.types.push(e.uint32());else i.types.push(e.uint32());break;case 7:i.metadata&&i.metadata.length||(i.metadata=[]),i.metadata.push(r.OperationMetadataDescriptor.decode(e,e.uint32()));break;case 8:i.initData=e.string();break;case 9:i.isInitialized=e.bool();break;case 10:i.sessionId=e.string();break;case 11:i.lastOperationId=e.string();break;case 12:i.sessionCreatedAt=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.channel&&t.hasOwnProperty("channel")&&!n.isString(t.channel))return"channel: string expected";if(null!=t.offset&&t.hasOwnProperty("offset")&&!n.isInteger(t.offset))return"offset: integer expected";if(null!=t.version&&t.hasOwnProperty("version")&&!n.isInteger(t.version))return"version: integer expected";if(null!=t.buffers&&t.hasOwnProperty("buffers")){if(!Array.isArray(t.buffers))return"buffers: array expected";for(var e=0;e<t.buffers.length;++e)if(!(t.buffers[e]&&"number"==typeof t.buffers[e].length||n.isString(t.buffers[e])))return"buffers: buffer[] expected"}if(null!=t.types&&t.hasOwnProperty("types")){if(!Array.isArray(t.types))return"types: array expected";for(e=0;e<t.types.length;++e)if(!n.isInteger(t.types[e]))return"types: integer[] expected"}if(null!=t.metadata&&t.hasOwnProperty("metadata")){if(!Array.isArray(t.metadata))return"metadata: array expected";for(e=0;e<t.metadata.length;++e){var s=r.OperationMetadataDescriptor.verify(t.metadata[e]);if(s)return"metadata."+s}}return null!=t.initData&&t.hasOwnProperty("initData")&&!n.isString(t.initData)?"initData: string expected":null!=t.isInitialized&&t.hasOwnProperty("isInitialized")&&"boolean"!=typeof t.isInitialized?"isInitialized: boolean expected":null!=t.sessionId&&t.hasOwnProperty("sessionId")&&!n.isString(t.sessionId)?"sessionId: string expected":null!=t.lastOperationId&&t.hasOwnProperty("lastOperationId")&&!n.isString(t.lastOperationId)?"lastOperationId: string expected":null!=t.sessionCreatedAt&&t.hasOwnProperty("sessionCreatedAt")&&!n.isString(t.sessionCreatedAt)?"sessionCreatedAt: string expected":null},s.fromObject=function(t){if(t instanceof r.CollaborativeEditingConnectResponse)return t;var e=new r.CollaborativeEditingConnectResponse;if(null!=t.channel&&(e.channel=String(t.channel)),null!=t.offset&&(e.offset=t.offset>>>0),null!=t.version&&(e.version=t.version>>>0),t.buffers){if(!Array.isArray(t.buffers))throw TypeError(".CollaborativeEditingConnectResponse.buffers: array expected");e.buffers=[];for(var s=0;s<t.buffers.length;++s)"string"==typeof t.buffers[s]?n.base64.decode(t.buffers[s],e.buffers[s]=n.newBuffer(n.base64.length(t.buffers[s])),0):t.buffers[s].length>=0&&(e.buffers[s]=t.buffers[s])}if(t.types){if(!Array.isArray(t.types))throw TypeError(".CollaborativeEditingConnectResponse.types: array expected");for(e.types=[],s=0;s<t.types.length;++s)e.types[s]=t.types[s]>>>0}if(t.metadata){if(!Array.isArray(t.metadata))throw TypeError(".CollaborativeEditingConnectResponse.metadata: array expected");for(e.metadata=[],s=0;s<t.metadata.length;++s){if("object"!=typeof t.metadata[s])throw TypeError(".CollaborativeEditingConnectResponse.metadata: object expected");e.metadata[s]=r.OperationMetadataDescriptor.fromObject(t.metadata[s])}}return null!=t.initData&&(e.initData=String(t.initData)),null!=t.isInitialized&&(e.isInitialized=Boolean(t.isInitialized)),null!=t.sessionId&&(e.sessionId=String(t.sessionId)),null!=t.lastOperationId&&(e.lastOperationId=String(t.lastOperationId)),null!=t.sessionCreatedAt&&(e.sessionCreatedAt=String(t.sessionCreatedAt)),e},s.toObject=function(t,e){e||(e={});var s={};if((e.arrays||e.defaults)&&(s.buffers=[],s.types=[],s.metadata=[]),e.defaults&&(s.channel="",s.offset=0,s.version=0,s.initData="",s.isInitialized=!1,s.sessionId="",s.lastOperationId="",s.sessionCreatedAt=""),null!=t.channel&&t.hasOwnProperty("channel")&&(s.channel=t.channel),null!=t.offset&&t.hasOwnProperty("offset")&&(s.offset=t.offset),null!=t.version&&t.hasOwnProperty("version")&&(s.version=t.version),t.buffers&&t.buffers.length){s.buffers=[];for(var o=0;o<t.buffers.length;++o)s.buffers[o]=e.bytes===String?n.base64.encode(t.buffers[o],0,t.buffers[o].length):e.bytes===Array?Array.prototype.slice.call(t.buffers[o]):t.buffers[o]}if(t.types&&t.types.length)for(s.types=[],o=0;o<t.types.length;++o)s.types[o]=t.types[o];if(t.metadata&&t.metadata.length)for(s.metadata=[],o=0;o<t.metadata.length;++o)s.metadata[o]=r.OperationMetadataDescriptor.toObject(t.metadata[o],e);return null!=t.initData&&t.hasOwnProperty("initData")&&(s.initData=t.initData),null!=t.isInitialized&&t.hasOwnProperty("isInitialized")&&(s.isInitialized=t.isInitialized),null!=t.sessionId&&t.hasOwnProperty("sessionId")&&(s.sessionId=t.sessionId),null!=t.lastOperationId&&t.hasOwnProperty("lastOperationId")&&(s.lastOperationId=t.lastOperationId),null!=t.sessionCreatedAt&&t.hasOwnProperty("sessionCreatedAt")&&(s.sessionCreatedAt=t.sessionCreatedAt),s},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CollaborativeEditingConnectResponse"},s}(),r.CollaborativeEditingResponse=function(){function s(t){if(this.buffers=[],this.types=[],this.metadata=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.version=0,s.prototype.buffers=n.emptyArray,s.prototype.types=n.emptyArray,s.prototype.metadata=n.emptyArray,s.prototype.lastOperationId="",s.prototype.lastOperationAcceptedAt="",s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.version&&Object.hasOwnProperty.call(t,"version")&&n.uint32(8).uint32(t.version),null!=t.buffers&&t.buffers.length)for(var s=0;s<t.buffers.length;++s)n.uint32(18).bytes(t.buffers[s]);if(null!=t.types&&t.types.length){for(n.uint32(26).fork(),s=0;s<t.types.length;++s)n.uint32(t.types[s]);n.ldelim()}if(null!=t.metadata&&t.metadata.length)for(s=0;s<t.metadata.length;++s)r.OperationMetadataDescriptor.encode(t.metadata[s],n.uint32(42).fork()).ldelim();return null!=t.lastOperationId&&Object.hasOwnProperty.call(t,"lastOperationId")&&n.uint32(50).string(t.lastOperationId),null!=t.lastOperationAcceptedAt&&Object.hasOwnProperty.call(t,"lastOperationAcceptedAt")&&n.uint32(58).string(t.lastOperationAcceptedAt),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CollaborativeEditingResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.version=e.uint32();break;case 2:i.buffers&&i.buffers.length||(i.buffers=[]),i.buffers.push(e.bytes());break;case 3:if(i.types&&i.types.length||(i.types=[]),2==(7&a))for(var c=e.uint32()+e.pos;e.pos<c;)i.types.push(e.uint32());else i.types.push(e.uint32());break;case 5:i.metadata&&i.metadata.length||(i.metadata=[]),i.metadata.push(r.OperationMetadataDescriptor.decode(e,e.uint32()));break;case 6:i.lastOperationId=e.string();break;case 7:i.lastOperationAcceptedAt=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.version&&t.hasOwnProperty("version")&&!n.isInteger(t.version))return"version: integer expected";if(null!=t.buffers&&t.hasOwnProperty("buffers")){if(!Array.isArray(t.buffers))return"buffers: array expected";for(var e=0;e<t.buffers.length;++e)if(!(t.buffers[e]&&"number"==typeof t.buffers[e].length||n.isString(t.buffers[e])))return"buffers: buffer[] expected"}if(null!=t.types&&t.hasOwnProperty("types")){if(!Array.isArray(t.types))return"types: array expected";for(e=0;e<t.types.length;++e)if(!n.isInteger(t.types[e]))return"types: integer[] expected"}if(null!=t.metadata&&t.hasOwnProperty("metadata")){if(!Array.isArray(t.metadata))return"metadata: array expected";for(e=0;e<t.metadata.length;++e){var s=r.OperationMetadataDescriptor.verify(t.metadata[e]);if(s)return"metadata."+s}}return null!=t.lastOperationId&&t.hasOwnProperty("lastOperationId")&&!n.isString(t.lastOperationId)?"lastOperationId: string expected":null!=t.lastOperationAcceptedAt&&t.hasOwnProperty("lastOperationAcceptedAt")&&!n.isString(t.lastOperationAcceptedAt)?"lastOperationAcceptedAt: string expected":null},s.fromObject=function(t){if(t instanceof r.CollaborativeEditingResponse)return t;var e=new r.CollaborativeEditingResponse;if(null!=t.version&&(e.version=t.version>>>0),t.buffers){if(!Array.isArray(t.buffers))throw TypeError(".CollaborativeEditingResponse.buffers: array expected");e.buffers=[];for(var s=0;s<t.buffers.length;++s)"string"==typeof t.buffers[s]?n.base64.decode(t.buffers[s],e.buffers[s]=n.newBuffer(n.base64.length(t.buffers[s])),0):t.buffers[s].length>=0&&(e.buffers[s]=t.buffers[s])}if(t.types){if(!Array.isArray(t.types))throw TypeError(".CollaborativeEditingResponse.types: array expected");for(e.types=[],s=0;s<t.types.length;++s)e.types[s]=t.types[s]>>>0}if(t.metadata){if(!Array.isArray(t.metadata))throw TypeError(".CollaborativeEditingResponse.metadata: array expected");for(e.metadata=[],s=0;s<t.metadata.length;++s){if("object"!=typeof t.metadata[s])throw TypeError(".CollaborativeEditingResponse.metadata: object expected");e.metadata[s]=r.OperationMetadataDescriptor.fromObject(t.metadata[s])}}return null!=t.lastOperationId&&(e.lastOperationId=String(t.lastOperationId)),null!=t.lastOperationAcceptedAt&&(e.lastOperationAcceptedAt=String(t.lastOperationAcceptedAt)),e},s.toObject=function(t,e){e||(e={});var s={};if((e.arrays||e.defaults)&&(s.buffers=[],s.types=[],s.metadata=[]),e.defaults&&(s.version=0,s.lastOperationId="",s.lastOperationAcceptedAt=""),null!=t.version&&t.hasOwnProperty("version")&&(s.version=t.version),t.buffers&&t.buffers.length){s.buffers=[];for(var o=0;o<t.buffers.length;++o)s.buffers[o]=e.bytes===String?n.base64.encode(t.buffers[o],0,t.buffers[o].length):e.bytes===Array?Array.prototype.slice.call(t.buffers[o]):t.buffers[o]}if(t.types&&t.types.length)for(s.types=[],o=0;o<t.types.length;++o)s.types[o]=t.types[o];if(t.metadata&&t.metadata.length)for(s.metadata=[],o=0;o<t.metadata.length;++o)s.metadata[o]=r.OperationMetadataDescriptor.toObject(t.metadata[o],e);return null!=t.lastOperationId&&t.hasOwnProperty("lastOperationId")&&(s.lastOperationId=t.lastOperationId),null!=t.lastOperationAcceptedAt&&t.hasOwnProperty("lastOperationAcceptedAt")&&(s.lastOperationAcceptedAt=t.lastOperationAcceptedAt),s},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CollaborativeEditingResponse"},s}(),r.GetDocumentDetailsResponse=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.lastDocumentSessionId="",s.prototype.lastDocumentSessionOperationId="",s.prototype.currentDocumentSessionId="",s.prototype.currentDocumentSessionVersion=0,s.prototype.currentDocumentSessionOperationId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.lastDocumentSessionId&&Object.hasOwnProperty.call(t,"lastDocumentSessionId")&&n.uint32(10).string(t.lastDocumentSessionId),null!=t.lastDocumentSessionOperationId&&Object.hasOwnProperty.call(t,"lastDocumentSessionOperationId")&&n.uint32(18).string(t.lastDocumentSessionOperationId),null!=t.currentDocumentSessionId&&Object.hasOwnProperty.call(t,"currentDocumentSessionId")&&n.uint32(26).string(t.currentDocumentSessionId),null!=t.currentDocumentSessionVersion&&Object.hasOwnProperty.call(t,"currentDocumentSessionVersion")&&n.uint32(32).uint32(t.currentDocumentSessionVersion),null!=t.currentDocumentSessionOperationId&&Object.hasOwnProperty.call(t,"currentDocumentSessionOperationId")&&n.uint32(42).string(t.currentDocumentSessionOperationId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.GetDocumentDetailsResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.lastDocumentSessionId=e.string();break;case 2:i.lastDocumentSessionOperationId=e.string();break;case 3:i.currentDocumentSessionId=e.string();break;case 4:i.currentDocumentSessionVersion=e.uint32();break;case 5:i.currentDocumentSessionOperationId=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.lastDocumentSessionId&&t.hasOwnProperty("lastDocumentSessionId")&&!n.isString(t.lastDocumentSessionId)?"lastDocumentSessionId: string expected":null!=t.lastDocumentSessionOperationId&&t.hasOwnProperty("lastDocumentSessionOperationId")&&!n.isString(t.lastDocumentSessionOperationId)?"lastDocumentSessionOperationId: string expected":null!=t.currentDocumentSessionId&&t.hasOwnProperty("currentDocumentSessionId")&&!n.isString(t.currentDocumentSessionId)?"currentDocumentSessionId: string expected":null!=t.currentDocumentSessionVersion&&t.hasOwnProperty("currentDocumentSessionVersion")&&!n.isInteger(t.currentDocumentSessionVersion)?"currentDocumentSessionVersion: integer expected":null!=t.currentDocumentSessionOperationId&&t.hasOwnProperty("currentDocumentSessionOperationId")&&!n.isString(t.currentDocumentSessionOperationId)?"currentDocumentSessionOperationId: string expected":null},s.fromObject=function(t){if(t instanceof r.GetDocumentDetailsResponse)return t;var e=new r.GetDocumentDetailsResponse;return null!=t.lastDocumentSessionId&&(e.lastDocumentSessionId=String(t.lastDocumentSessionId)),null!=t.lastDocumentSessionOperationId&&(e.lastDocumentSessionOperationId=String(t.lastDocumentSessionOperationId)),null!=t.currentDocumentSessionId&&(e.currentDocumentSessionId=String(t.currentDocumentSessionId)),null!=t.currentDocumentSessionVersion&&(e.currentDocumentSessionVersion=t.currentDocumentSessionVersion>>>0),null!=t.currentDocumentSessionOperationId&&(e.currentDocumentSessionOperationId=String(t.currentDocumentSessionOperationId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.lastDocumentSessionId="",n.lastDocumentSessionOperationId="",n.currentDocumentSessionId="",n.currentDocumentSessionVersion=0,n.currentDocumentSessionOperationId=""),null!=t.lastDocumentSessionId&&t.hasOwnProperty("lastDocumentSessionId")&&(n.lastDocumentSessionId=t.lastDocumentSessionId),null!=t.lastDocumentSessionOperationId&&t.hasOwnProperty("lastDocumentSessionOperationId")&&(n.lastDocumentSessionOperationId=t.lastDocumentSessionOperationId),null!=t.currentDocumentSessionId&&t.hasOwnProperty("currentDocumentSessionId")&&(n.currentDocumentSessionId=t.currentDocumentSessionId),null!=t.currentDocumentSessionVersion&&t.hasOwnProperty("currentDocumentSessionVersion")&&(n.currentDocumentSessionVersion=t.currentDocumentSessionVersion),null!=t.currentDocumentSessionOperationId&&t.hasOwnProperty("currentDocumentSessionOperationId")&&(n.currentDocumentSessionOperationId=t.currentDocumentSessionOperationId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/GetDocumentDetailsResponse"},s}(),r.CommentDescriptor=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentId="",s.prototype.commentThreadId="",s.prototype.userId="",s.prototype.content="",s.prototype.documentId="",s.prototype.createdAt="",s.prototype.attributes="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentId&&Object.hasOwnProperty.call(t,"commentId")&&n.uint32(10).string(t.commentId),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(18).string(t.commentThreadId),null!=t.userId&&Object.hasOwnProperty.call(t,"userId")&&n.uint32(26).string(t.userId),null!=t.content&&Object.hasOwnProperty.call(t,"content")&&n.uint32(34).string(t.content),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(42).string(t.documentId),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(50).string(t.createdAt),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(58).string(t.attributes),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentDescriptor;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentId=e.string();break;case 2:i.commentThreadId=e.string();break;case 3:i.userId=e.string();break;case 4:i.content=e.string();break;case 5:i.documentId=e.string();break;case 6:i.createdAt=e.string();break;case 7:i.attributes=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.commentId&&t.hasOwnProperty("commentId")&&!n.isString(t.commentId)?"commentId: string expected":null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId)?"commentThreadId: string expected":null!=t.userId&&t.hasOwnProperty("userId")&&!n.isString(t.userId)?"userId: string expected":null!=t.content&&t.hasOwnProperty("content")&&!n.isString(t.content)?"content: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentDescriptor)return t;var e=new r.CommentDescriptor;return null!=t.commentId&&(e.commentId=String(t.commentId)),null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.userId&&(e.userId=String(t.userId)),null!=t.content&&(e.content=String(t.content)),null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),null!=t.attributes&&(e.attributes=String(t.attributes)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentId="",n.commentThreadId="",n.userId="",n.content="",n.documentId="",n.createdAt="",n.attributes=""),null!=t.commentId&&t.hasOwnProperty("commentId")&&(n.commentId=t.commentId),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.userId&&t.hasOwnProperty("userId")&&(n.userId=t.userId),null!=t.content&&t.hasOwnProperty("content")&&(n.content=t.content),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentDescriptor"},s}(),r.CommentsThreadDescriptor=function(){function s(t){if(this.comments=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.comments=n.emptyArray,s.prototype.resolvedAt="",s.prototype.resolvedBy="",s.prototype.context="",s.prototype.createdAt="",s.prototype.deletedAt="",s.prototype.attributes="",s.prototype.unlinkedAt="",s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.comments&&t.comments.length)for(var s=0;s<t.comments.length;++s)r.CommentDescriptor.encode(t.comments[s],n.uint32(18).fork()).ldelim();return null!=t.resolvedAt&&Object.hasOwnProperty.call(t,"resolvedAt")&&n.uint32(26).string(t.resolvedAt),null!=t.resolvedBy&&Object.hasOwnProperty.call(t,"resolvedBy")&&n.uint32(34).string(t.resolvedBy),null!=t.context&&Object.hasOwnProperty.call(t,"context")&&n.uint32(42).string(t.context),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(50).string(t.createdAt),null!=t.deletedAt&&Object.hasOwnProperty.call(t,"deletedAt")&&n.uint32(58).string(t.deletedAt),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(66).string(t.attributes),null!=t.unlinkedAt&&Object.hasOwnProperty.call(t,"unlinkedAt")&&n.uint32(74).string(t.unlinkedAt),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsThreadDescriptor;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.comments&&i.comments.length||(i.comments=[]),i.comments.push(r.CommentDescriptor.decode(e,e.uint32()));break;case 3:i.resolvedAt=e.string();break;case 4:i.resolvedBy=e.string();break;case 5:i.context=e.string();break;case 6:i.createdAt=e.string();break;case 7:i.deletedAt=e.string();break;case 8:i.attributes=e.string();break;case 9:i.unlinkedAt=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId))return"commentThreadId: string expected";if(null!=t.comments&&t.hasOwnProperty("comments")){if(!Array.isArray(t.comments))return"comments: array expected";for(var e=0;e<t.comments.length;++e){var s=r.CommentDescriptor.verify(t.comments[e]);if(s)return"comments."+s}}return null!=t.resolvedAt&&t.hasOwnProperty("resolvedAt")&&!n.isString(t.resolvedAt)?"resolvedAt: string expected":null!=t.resolvedBy&&t.hasOwnProperty("resolvedBy")&&!n.isString(t.resolvedBy)?"resolvedBy: string expected":null!=t.context&&t.hasOwnProperty("context")&&!n.isString(t.context)?"context: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null!=t.deletedAt&&t.hasOwnProperty("deletedAt")&&!n.isString(t.deletedAt)?"deletedAt: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null!=t.unlinkedAt&&t.hasOwnProperty("unlinkedAt")&&!n.isString(t.unlinkedAt)?"unlinkedAt: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsThreadDescriptor)return t;var e=new r.CommentsThreadDescriptor;if(null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),t.comments){if(!Array.isArray(t.comments))throw TypeError(".CommentsThreadDescriptor.comments: array expected");e.comments=[];for(var n=0;n<t.comments.length;++n){if("object"!=typeof t.comments[n])throw TypeError(".CommentsThreadDescriptor.comments: object expected");e.comments[n]=r.CommentDescriptor.fromObject(t.comments[n])}}return null!=t.resolvedAt&&(e.resolvedAt=String(t.resolvedAt)),null!=t.resolvedBy&&(e.resolvedBy=String(t.resolvedBy)),null!=t.context&&(e.context=String(t.context)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),null!=t.deletedAt&&(e.deletedAt=String(t.deletedAt)),null!=t.attributes&&(e.attributes=String(t.attributes)),null!=t.unlinkedAt&&(e.unlinkedAt=String(t.unlinkedAt)),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.comments=[]),e.defaults&&(n.commentThreadId="",n.resolvedAt="",n.resolvedBy="",n.context="",n.createdAt="",n.deletedAt="",n.attributes="",n.unlinkedAt=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),t.comments&&t.comments.length){n.comments=[];for(var s=0;s<t.comments.length;++s)n.comments[s]=r.CommentDescriptor.toObject(t.comments[s],e)}return null!=t.resolvedAt&&t.hasOwnProperty("resolvedAt")&&(n.resolvedAt=t.resolvedAt),null!=t.resolvedBy&&t.hasOwnProperty("resolvedBy")&&(n.resolvedBy=t.resolvedBy),null!=t.context&&t.hasOwnProperty("context")&&(n.context=t.context),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),null!=t.deletedAt&&t.hasOwnProperty("deletedAt")&&(n.deletedAt=t.deletedAt),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),null!=t.unlinkedAt&&t.hasOwnProperty("unlinkedAt")&&(n.unlinkedAt=t.unlinkedAt),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsThreadDescriptor"},s}(),r.CommentThreadAddedCommentDescriptor=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentId="",s.prototype.createdAt="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentId&&Object.hasOwnProperty.call(t,"commentId")&&n.uint32(10).string(t.commentId),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(18).string(t.createdAt),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentThreadAddedCommentDescriptor;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentId=e.string();break;case 2:i.createdAt=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.commentId&&t.hasOwnProperty("commentId")&&!n.isString(t.commentId)?"commentId: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentThreadAddedCommentDescriptor)return t;var e=new r.CommentThreadAddedCommentDescriptor;return null!=t.commentId&&(e.commentId=String(t.commentId)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentId="",n.createdAt=""),null!=t.commentId&&t.hasOwnProperty("commentId")&&(n.commentId=t.commentId),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentThreadAddedCommentDescriptor"},s}(),r.CommentsV2AddCommentMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.content="",s.prototype.documentId="",s.prototype.commentId="",s.prototype.createdAt="",s.prototype.userId="",s.prototype.attributes="",s.prototype.commentThread=null,s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.content&&Object.hasOwnProperty.call(t,"content")&&n.uint32(18).string(t.content),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(26).string(t.documentId),null!=t.commentId&&Object.hasOwnProperty.call(t,"commentId")&&n.uint32(34).string(t.commentId),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(42).string(t.createdAt),null!=t.userId&&Object.hasOwnProperty.call(t,"userId")&&n.uint32(50).string(t.userId),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(58).string(t.attributes),null!=t.commentThread&&Object.hasOwnProperty.call(t,"commentThread")&&r.CommentsThreadDescriptor.encode(t.commentThread,n.uint32(66).fork()).ldelim(),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2AddCommentMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.content=e.string();break;case 3:i.documentId=e.string();break;case 4:i.commentId=e.string();break;case 5:i.createdAt=e.string();break;case 6:i.userId=e.string();break;case 7:i.attributes=e.string();break;case 8:i.commentThread=r.CommentsThreadDescriptor.decode(e,e.uint32());break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId))return"commentThreadId: string expected";if(null!=t.content&&t.hasOwnProperty("content")&&!n.isString(t.content))return"content: string expected";if(null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId))return"documentId: string expected";if(null!=t.commentId&&t.hasOwnProperty("commentId")&&!n.isString(t.commentId))return"commentId: string expected";if(null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt))return"createdAt: string expected";if(null!=t.userId&&t.hasOwnProperty("userId")&&!n.isString(t.userId))return"userId: string expected";if(null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes))return"attributes: string expected";if(null!=t.commentThread&&t.hasOwnProperty("commentThread")){var e=r.CommentsThreadDescriptor.verify(t.commentThread);if(e)return"commentThread."+e}return null},s.fromObject=function(t){if(t instanceof r.CommentsV2AddCommentMessage)return t;var e=new r.CommentsV2AddCommentMessage;if(null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.content&&(e.content=String(t.content)),null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.commentId&&(e.commentId=String(t.commentId)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),null!=t.userId&&(e.userId=String(t.userId)),null!=t.attributes&&(e.attributes=String(t.attributes)),null!=t.commentThread){if("object"!=typeof t.commentThread)throw TypeError(".CommentsV2AddCommentMessage.commentThread: object expected");e.commentThread=r.CommentsThreadDescriptor.fromObject(t.commentThread)}return e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentThreadId="",n.content="",n.documentId="",n.commentId="",n.createdAt="",n.userId="",n.attributes="",n.commentThread=null),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.content&&t.hasOwnProperty("content")&&(n.content=t.content),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.commentId&&t.hasOwnProperty("commentId")&&(n.commentId=t.commentId),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),null!=t.userId&&t.hasOwnProperty("userId")&&(n.userId=t.userId),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),null!=t.commentThread&&t.hasOwnProperty("commentThread")&&(n.commentThread=r.CommentsThreadDescriptor.toObject(t.commentThread,e)),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2AddCommentMessage"},s}(),r.CommentsV2AddCommentThreadMessage=function(){function s(t){if(this.comments=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.documentId="",s.prototype.commentThreadId="",s.prototype.context="",s.prototype.createdAt="",s.prototype.resolvedAt="",s.prototype.resolvedBy="",s.prototype.attributes="",s.prototype.deletedAt="",s.prototype.comments=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(10).string(t.documentId),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(18).string(t.commentThreadId),null!=t.context&&Object.hasOwnProperty.call(t,"context")&&n.uint32(26).string(t.context),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(34).string(t.createdAt),null!=t.resolvedAt&&Object.hasOwnProperty.call(t,"resolvedAt")&&n.uint32(42).string(t.resolvedAt),null!=t.resolvedBy&&Object.hasOwnProperty.call(t,"resolvedBy")&&n.uint32(50).string(t.resolvedBy),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(58).string(t.attributes),null!=t.deletedAt&&Object.hasOwnProperty.call(t,"deletedAt")&&n.uint32(66).string(t.deletedAt),null!=t.comments&&t.comments.length)for(var s=0;s<t.comments.length;++s)r.CommentDescriptor.encode(t.comments[s],n.uint32(74).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2AddCommentThreadMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.documentId=e.string();break;case 2:i.commentThreadId=e.string();break;case 3:i.context=e.string();break;case 4:i.createdAt=e.string();break;case 5:i.resolvedAt=e.string();break;case 6:i.resolvedBy=e.string();break;case 7:i.attributes=e.string();break;case 8:i.deletedAt=e.string();break;case 9:i.comments&&i.comments.length||(i.comments=[]),i.comments.push(r.CommentDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId))return"documentId: string expected";if(null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId))return"commentThreadId: string expected";if(null!=t.context&&t.hasOwnProperty("context")&&!n.isString(t.context))return"context: string expected";if(null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt))return"createdAt: string expected";if(null!=t.resolvedAt&&t.hasOwnProperty("resolvedAt")&&!n.isString(t.resolvedAt))return"resolvedAt: string expected";if(null!=t.resolvedBy&&t.hasOwnProperty("resolvedBy")&&!n.isString(t.resolvedBy))return"resolvedBy: string expected";if(null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes))return"attributes: string expected";if(null!=t.deletedAt&&t.hasOwnProperty("deletedAt")&&!n.isString(t.deletedAt))return"deletedAt: string expected";if(null!=t.comments&&t.hasOwnProperty("comments")){if(!Array.isArray(t.comments))return"comments: array expected";for(var e=0;e<t.comments.length;++e){var s=r.CommentDescriptor.verify(t.comments[e]);if(s)return"comments."+s}}return null},s.fromObject=function(t){if(t instanceof r.CommentsV2AddCommentThreadMessage)return t;var e=new r.CommentsV2AddCommentThreadMessage;if(null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.context&&(e.context=String(t.context)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),null!=t.resolvedAt&&(e.resolvedAt=String(t.resolvedAt)),null!=t.resolvedBy&&(e.resolvedBy=String(t.resolvedBy)),null!=t.attributes&&(e.attributes=String(t.attributes)),null!=t.deletedAt&&(e.deletedAt=String(t.deletedAt)),t.comments){if(!Array.isArray(t.comments))throw TypeError(".CommentsV2AddCommentThreadMessage.comments: array expected");e.comments=[];for(var n=0;n<t.comments.length;++n){if("object"!=typeof t.comments[n])throw TypeError(".CommentsV2AddCommentThreadMessage.comments: object expected");e.comments[n]=r.CommentDescriptor.fromObject(t.comments[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.comments=[]),e.defaults&&(n.documentId="",n.commentThreadId="",n.context="",n.createdAt="",n.resolvedAt="",n.resolvedBy="",n.attributes="",n.deletedAt=""),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.context&&t.hasOwnProperty("context")&&(n.context=t.context),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),null!=t.resolvedAt&&t.hasOwnProperty("resolvedAt")&&(n.resolvedAt=t.resolvedAt),null!=t.resolvedBy&&t.hasOwnProperty("resolvedBy")&&(n.resolvedBy=t.resolvedBy),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),null!=t.deletedAt&&t.hasOwnProperty("deletedAt")&&(n.deletedAt=t.deletedAt),t.comments&&t.comments.length){n.comments=[];for(var s=0;s<t.comments.length;++s)n.comments[s]=r.CommentDescriptor.toObject(t.comments[s],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2AddCommentThreadMessage"},s}(),r.CommentsV2ReopenCommentThreadMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.documentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(18).string(t.documentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2ReopenCommentThreadMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.documentId=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId)?"commentThreadId: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2ReopenCommentThreadMessage)return t;var e=new r.CommentsV2ReopenCommentThreadMessage;return null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.documentId&&(e.documentId=String(t.documentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentThreadId="",n.documentId=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2ReopenCommentThreadMessage"},s}(),r.CommentsV2ResolveCommentThreadMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.documentId="",s.prototype.resolvedBy="",s.prototype.resolvedAt="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(18).string(t.documentId),null!=t.resolvedBy&&Object.hasOwnProperty.call(t,"resolvedBy")&&n.uint32(26).string(t.resolvedBy),null!=t.resolvedAt&&Object.hasOwnProperty.call(t,"resolvedAt")&&n.uint32(34).string(t.resolvedAt),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2ResolveCommentThreadMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.documentId=e.string();break;case 3:i.resolvedBy=e.string();break;case 4:i.resolvedAt=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId)?"commentThreadId: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null!=t.resolvedBy&&t.hasOwnProperty("resolvedBy")&&!n.isString(t.resolvedBy)?"resolvedBy: string expected":null!=t.resolvedAt&&t.hasOwnProperty("resolvedAt")&&!n.isString(t.resolvedAt)?"resolvedAt: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2ResolveCommentThreadMessage)return t;var e=new r.CommentsV2ResolveCommentThreadMessage;return null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.resolvedBy&&(e.resolvedBy=String(t.resolvedBy)),null!=t.resolvedAt&&(e.resolvedAt=String(t.resolvedAt)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentThreadId="",n.documentId="",n.resolvedBy="",n.resolvedAt=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.resolvedBy&&t.hasOwnProperty("resolvedBy")&&(n.resolvedBy=t.resolvedBy),null!=t.resolvedAt&&t.hasOwnProperty("resolvedAt")&&(n.resolvedAt=t.resolvedAt),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2ResolveCommentThreadMessage"},s}(),r.CommentsV2UpdateCommentThreadMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.documentId="",s.prototype.context="",s.prototype.attributes="",s.prototype.unlinkedAt="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(18).string(t.documentId),null!=t.context&&Object.hasOwnProperty.call(t,"context")&&n.uint32(26).string(t.context),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(34).string(t.attributes),null!=t.unlinkedAt&&Object.hasOwnProperty.call(t,"unlinkedAt")&&n.uint32(42).string(t.unlinkedAt),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2UpdateCommentThreadMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.documentId=e.string();break;case 3:i.context=e.string();break;case 4:i.attributes=e.string();break;case 5:i.unlinkedAt=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId)?"commentThreadId: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null!=t.context&&t.hasOwnProperty("context")&&!n.isString(t.context)?"context: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null!=t.unlinkedAt&&t.hasOwnProperty("unlinkedAt")&&!n.isString(t.unlinkedAt)?"unlinkedAt: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2UpdateCommentThreadMessage)return t;var e=new r.CommentsV2UpdateCommentThreadMessage;return null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.context&&(e.context=String(t.context)),null!=t.attributes&&(e.attributes=String(t.attributes)),null!=t.unlinkedAt&&(e.unlinkedAt=String(t.unlinkedAt)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentThreadId="",n.documentId="",n.context="",n.attributes="",n.unlinkedAt=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.context&&t.hasOwnProperty("context")&&(n.context=t.context),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),null!=t.unlinkedAt&&t.hasOwnProperty("unlinkedAt")&&(n.unlinkedAt=t.unlinkedAt),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2UpdateCommentThreadMessage"},s}(),r.CommentsV2ConnectMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.documentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(10).string(t.documentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2ConnectMessage;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?i.documentId=e.string():e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2ConnectMessage)return t;var e=new r.CommentsV2ConnectMessage;return null!=t.documentId&&(e.documentId=String(t.documentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.documentId=""),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2ConnectMessage"},s}(),r.CommentsV2GetCommentThreadMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.documentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(18).string(t.documentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2GetCommentThreadMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.documentId=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId)?"commentThreadId: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2GetCommentThreadMessage)return t;var e=new r.CommentsV2GetCommentThreadMessage;return null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.documentId&&(e.documentId=String(t.documentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentThreadId="",n.documentId=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2GetCommentThreadMessage"},s}(),r.CommentsV2GetDocumentThreadsMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.documentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(10).string(t.documentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2GetDocumentThreadsMessage;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?i.documentId=e.string():e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2GetDocumentThreadsMessage)return t;var e=new r.CommentsV2GetDocumentThreadsMessage;return null!=t.documentId&&(e.documentId=String(t.documentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.documentId=""),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2GetDocumentThreadsMessage"},s}(),r.CommentsV2RemoveCommentMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.commentId="",s.prototype.documentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.commentId&&Object.hasOwnProperty.call(t,"commentId")&&n.uint32(18).string(t.commentId),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(26).string(t.documentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2RemoveCommentMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.commentId=e.string();break;case 3:i.documentId=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId)?"commentThreadId: string expected":null!=t.commentId&&t.hasOwnProperty("commentId")&&!n.isString(t.commentId)?"commentId: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2RemoveCommentMessage)return t;var e=new r.CommentsV2RemoveCommentMessage;return null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.commentId&&(e.commentId=String(t.commentId)),null!=t.documentId&&(e.documentId=String(t.documentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentThreadId="",n.commentId="",n.documentId=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.commentId&&t.hasOwnProperty("commentId")&&(n.commentId=t.commentId),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2RemoveCommentMessage"},s}(),r.CommentsV2RemoveCommentThreadMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.documentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(18).string(t.documentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2RemoveCommentThreadMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.documentId=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId)?"commentThreadId: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2RemoveCommentThreadMessage)return t;var e=new r.CommentsV2RemoveCommentThreadMessage;return null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.documentId&&(e.documentId=String(t.documentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentThreadId="",n.documentId=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2RemoveCommentThreadMessage"},s}(),r.CommentsV2UpdateCommentMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.commentId="",s.prototype.content="",s.prototype.documentId="",s.prototype.attributes="",s.prototype.isAttributesUpdated=!1,s.prototype.commentThread=null,s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.commentId&&Object.hasOwnProperty.call(t,"commentId")&&n.uint32(18).string(t.commentId),null!=t.content&&Object.hasOwnProperty.call(t,"content")&&n.uint32(26).string(t.content),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(34).string(t.documentId),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(42).string(t.attributes),null!=t.isAttributesUpdated&&Object.hasOwnProperty.call(t,"isAttributesUpdated")&&n.uint32(48).bool(t.isAttributesUpdated),null!=t.commentThread&&Object.hasOwnProperty.call(t,"commentThread")&&r.CommentsThreadDescriptor.encode(t.commentThread,n.uint32(58).fork()).ldelim(),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2UpdateCommentMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.commentId=e.string();break;case 3:i.content=e.string();break;case 4:i.documentId=e.string();break;case 5:i.attributes=e.string();break;case 6:i.isAttributesUpdated=e.bool();break;case 7:i.commentThread=r.CommentsThreadDescriptor.decode(e,e.uint32());break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId))return"commentThreadId: string expected";if(null!=t.commentId&&t.hasOwnProperty("commentId")&&!n.isString(t.commentId))return"commentId: string expected";if(null!=t.content&&t.hasOwnProperty("content")&&!n.isString(t.content))return"content: string expected";if(null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId))return"documentId: string expected";if(null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes))return"attributes: string expected";if(null!=t.isAttributesUpdated&&t.hasOwnProperty("isAttributesUpdated")&&"boolean"!=typeof t.isAttributesUpdated)return"isAttributesUpdated: boolean expected";if(null!=t.commentThread&&t.hasOwnProperty("commentThread")){var e=r.CommentsThreadDescriptor.verify(t.commentThread);if(e)return"commentThread."+e}return null},s.fromObject=function(t){if(t instanceof r.CommentsV2UpdateCommentMessage)return t;var e=new r.CommentsV2UpdateCommentMessage;if(null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.commentId&&(e.commentId=String(t.commentId)),null!=t.content&&(e.content=String(t.content)),null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.attributes&&(e.attributes=String(t.attributes)),null!=t.isAttributesUpdated&&(e.isAttributesUpdated=Boolean(t.isAttributesUpdated)),null!=t.commentThread){if("object"!=typeof t.commentThread)throw TypeError(".CommentsV2UpdateCommentMessage.commentThread: object expected");e.commentThread=r.CommentsThreadDescriptor.fromObject(t.commentThread)}return e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentThreadId="",n.commentId="",n.content="",n.documentId="",n.attributes="",n.isAttributesUpdated=!1,n.commentThread=null),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.commentId&&t.hasOwnProperty("commentId")&&(n.commentId=t.commentId),null!=t.content&&t.hasOwnProperty("content")&&(n.content=t.content),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),null!=t.isAttributesUpdated&&t.hasOwnProperty("isAttributesUpdated")&&(n.isAttributesUpdated=t.isAttributesUpdated),null!=t.commentThread&&t.hasOwnProperty("commentThread")&&(n.commentThread=r.CommentsThreadDescriptor.toObject(t.commentThread,e)),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2UpdateCommentMessage"},s}(),r.CommentsV2AddCommentResponse=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.commentId="",s.prototype.createdAt="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.commentId&&Object.hasOwnProperty.call(t,"commentId")&&n.uint32(18).string(t.commentId),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(26).string(t.createdAt),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2AddCommentResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.commentId=e.string();break;case 3:i.createdAt=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId)?"commentThreadId: string expected":null!=t.commentId&&t.hasOwnProperty("commentId")&&!n.isString(t.commentId)?"commentId: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2AddCommentResponse)return t;var e=new r.CommentsV2AddCommentResponse;return null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.commentId&&(e.commentId=String(t.commentId)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentThreadId="",n.commentId="",n.createdAt=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.commentId&&t.hasOwnProperty("commentId")&&(n.commentId=t.commentId),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2AddCommentResponse"},s}(),r.CommentsV2AddCommentThreadResponse=function(){function s(t){if(this.comments=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.createdAt="",s.prototype.comments=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(18).string(t.createdAt),null!=t.comments&&t.comments.length)for(var s=0;s<t.comments.length;++s)r.CommentThreadAddedCommentDescriptor.encode(t.comments[s],n.uint32(26).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2AddCommentThreadResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.createdAt=e.string();break;case 3:i.comments&&i.comments.length||(i.comments=[]),i.comments.push(r.CommentThreadAddedCommentDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId))return"commentThreadId: string expected";if(null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt))return"createdAt: string expected";if(null!=t.comments&&t.hasOwnProperty("comments")){if(!Array.isArray(t.comments))return"comments: array expected";for(var e=0;e<t.comments.length;++e){var s=r.CommentThreadAddedCommentDescriptor.verify(t.comments[e]);if(s)return"comments."+s}}return null},s.fromObject=function(t){if(t instanceof r.CommentsV2AddCommentThreadResponse)return t;var e=new r.CommentsV2AddCommentThreadResponse;if(null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),t.comments){if(!Array.isArray(t.comments))throw TypeError(".CommentsV2AddCommentThreadResponse.comments: array expected");e.comments=[];for(var n=0;n<t.comments.length;++n){if("object"!=typeof t.comments[n])throw TypeError(".CommentsV2AddCommentThreadResponse.comments: object expected");e.comments[n]=r.CommentThreadAddedCommentDescriptor.fromObject(t.comments[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.comments=[]),e.defaults&&(n.commentThreadId="",n.createdAt=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),t.comments&&t.comments.length){n.comments=[];for(var s=0;s<t.comments.length;++s)n.comments[s]=r.CommentThreadAddedCommentDescriptor.toObject(t.comments[s],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2AddCommentThreadResponse"},s}(),r.CommentsV2ResolveCommentThreadResponse=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.documentId="",s.prototype.resolvedAt="",s.prototype.resolvedBy="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(18).string(t.documentId),null!=t.resolvedAt&&Object.hasOwnProperty.call(t,"resolvedAt")&&n.uint32(26).string(t.resolvedAt),null!=t.resolvedBy&&Object.hasOwnProperty.call(t,"resolvedBy")&&n.uint32(34).string(t.resolvedBy),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2ResolveCommentThreadResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.documentId=e.string();break;case 3:i.resolvedAt=e.string();break;case 4:i.resolvedBy=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId)?"commentThreadId: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null!=t.resolvedAt&&t.hasOwnProperty("resolvedAt")&&!n.isString(t.resolvedAt)?"resolvedAt: string expected":null!=t.resolvedBy&&t.hasOwnProperty("resolvedBy")&&!n.isString(t.resolvedBy)?"resolvedBy: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2ResolveCommentThreadResponse)return t;var e=new r.CommentsV2ResolveCommentThreadResponse;return null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.resolvedAt&&(e.resolvedAt=String(t.resolvedAt)),null!=t.resolvedBy&&(e.resolvedBy=String(t.resolvedBy)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentThreadId="",n.documentId="",n.resolvedAt="",n.resolvedBy=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.resolvedAt&&t.hasOwnProperty("resolvedAt")&&(n.resolvedAt=t.resolvedAt),null!=t.resolvedBy&&t.hasOwnProperty("resolvedBy")&&(n.resolvedBy=t.resolvedBy),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2ResolveCommentThreadResponse"},s}(),r.CommentsV2ConnectResponse=function(){function s(t){if(this.threads=[],this.threadsV2=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.channel="",s.prototype.threads=n.emptyArray,s.prototype.threadsV2=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.channel&&Object.hasOwnProperty.call(t,"channel")&&n.uint32(10).string(t.channel),null!=t.threads&&t.threads.length)for(var s=0;s<t.threads.length;++s)n.uint32(18).string(t.threads[s]);if(null!=t.threadsV2&&t.threadsV2.length)for(s=0;s<t.threadsV2.length;++s)r.CommentsThreadDescriptor.encode(t.threadsV2[s],n.uint32(26).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2ConnectResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.channel=e.string();break;case 2:i.threads&&i.threads.length||(i.threads=[]),i.threads.push(e.string());break;case 3:i.threadsV2&&i.threadsV2.length||(i.threadsV2=[]),i.threadsV2.push(r.CommentsThreadDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.channel&&t.hasOwnProperty("channel")&&!n.isString(t.channel))return"channel: string expected";if(null!=t.threads&&t.hasOwnProperty("threads")){if(!Array.isArray(t.threads))return"threads: array expected";for(var e=0;e<t.threads.length;++e)if(!n.isString(t.threads[e]))return"threads: string[] expected"}if(null!=t.threadsV2&&t.hasOwnProperty("threadsV2")){if(!Array.isArray(t.threadsV2))return"threadsV2: array expected";for(e=0;e<t.threadsV2.length;++e){var s=r.CommentsThreadDescriptor.verify(t.threadsV2[e]);if(s)return"threadsV2."+s}}return null},s.fromObject=function(t){if(t instanceof r.CommentsV2ConnectResponse)return t;var e=new r.CommentsV2ConnectResponse;if(null!=t.channel&&(e.channel=String(t.channel)),t.threads){if(!Array.isArray(t.threads))throw TypeError(".CommentsV2ConnectResponse.threads: array expected");e.threads=[];for(var n=0;n<t.threads.length;++n)e.threads[n]=String(t.threads[n])}if(t.threadsV2){if(!Array.isArray(t.threadsV2))throw TypeError(".CommentsV2ConnectResponse.threadsV2: array expected");for(e.threadsV2=[],n=0;n<t.threadsV2.length;++n){if("object"!=typeof t.threadsV2[n])throw TypeError(".CommentsV2ConnectResponse.threadsV2: object expected");e.threadsV2[n]=r.CommentsThreadDescriptor.fromObject(t.threadsV2[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.threads=[],n.threadsV2=[]),e.defaults&&(n.channel=""),null!=t.channel&&t.hasOwnProperty("channel")&&(n.channel=t.channel),t.threads&&t.threads.length){n.threads=[];for(var s=0;s<t.threads.length;++s)n.threads[s]=t.threads[s]}if(t.threadsV2&&t.threadsV2.length)for(n.threadsV2=[],s=0;s<t.threadsV2.length;++s)n.threadsV2[s]=r.CommentsThreadDescriptor.toObject(t.threadsV2[s],e);return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2ConnectResponse"},s}(),r.CommentsV2GetCommentThreadResponse=function(){function s(t){if(this.comments=[],this.commentsV2=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.comments=n.emptyArray,s.prototype.commentsV2=n.emptyArray,s.prototype.resolvedAt="",s.prototype.resolvedBy="",s.prototype.context="",s.prototype.createdAt="",s.prototype.deletedAt="",s.prototype.attributes="",s.prototype.unlinkedAt="",s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.comments&&t.comments.length)for(var s=0;s<t.comments.length;++s)n.uint32(18).string(t.comments[s]);if(null!=t.commentsV2&&t.commentsV2.length)for(s=0;s<t.commentsV2.length;++s)r.CommentDescriptor.encode(t.commentsV2[s],n.uint32(26).fork()).ldelim();return null!=t.resolvedAt&&Object.hasOwnProperty.call(t,"resolvedAt")&&n.uint32(34).string(t.resolvedAt),null!=t.resolvedBy&&Object.hasOwnProperty.call(t,"resolvedBy")&&n.uint32(42).string(t.resolvedBy),null!=t.context&&Object.hasOwnProperty.call(t,"context")&&n.uint32(50).string(t.context),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(58).string(t.createdAt),null!=t.deletedAt&&Object.hasOwnProperty.call(t,"deletedAt")&&n.uint32(66).string(t.deletedAt),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(74).string(t.attributes),null!=t.unlinkedAt&&Object.hasOwnProperty.call(t,"unlinkedAt")&&n.uint32(82).string(t.unlinkedAt),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2GetCommentThreadResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.comments&&i.comments.length||(i.comments=[]),i.comments.push(e.string());break;case 3:i.commentsV2&&i.commentsV2.length||(i.commentsV2=[]),i.commentsV2.push(r.CommentDescriptor.decode(e,e.uint32()));break;case 4:i.resolvedAt=e.string();break;case 5:i.resolvedBy=e.string();break;case 6:i.context=e.string();break;case 7:i.createdAt=e.string();break;case 8:i.deletedAt=e.string();break;case 9:i.attributes=e.string();break;case 10:i.unlinkedAt=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId))return"commentThreadId: string expected";if(null!=t.comments&&t.hasOwnProperty("comments")){if(!Array.isArray(t.comments))return"comments: array expected";for(var e=0;e<t.comments.length;++e)if(!n.isString(t.comments[e]))return"comments: string[] expected"}if(null!=t.commentsV2&&t.hasOwnProperty("commentsV2")){if(!Array.isArray(t.commentsV2))return"commentsV2: array expected";for(e=0;e<t.commentsV2.length;++e){var s=r.CommentDescriptor.verify(t.commentsV2[e]);if(s)return"commentsV2."+s}}return null!=t.resolvedAt&&t.hasOwnProperty("resolvedAt")&&!n.isString(t.resolvedAt)?"resolvedAt: string expected":null!=t.resolvedBy&&t.hasOwnProperty("resolvedBy")&&!n.isString(t.resolvedBy)?"resolvedBy: string expected":null!=t.context&&t.hasOwnProperty("context")&&!n.isString(t.context)?"context: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null!=t.deletedAt&&t.hasOwnProperty("deletedAt")&&!n.isString(t.deletedAt)?"deletedAt: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null!=t.unlinkedAt&&t.hasOwnProperty("unlinkedAt")&&!n.isString(t.unlinkedAt)?"unlinkedAt: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2GetCommentThreadResponse)return t;var e=new r.CommentsV2GetCommentThreadResponse;if(null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),t.comments){if(!Array.isArray(t.comments))throw TypeError(".CommentsV2GetCommentThreadResponse.comments: array expected");e.comments=[];for(var n=0;n<t.comments.length;++n)e.comments[n]=String(t.comments[n])}if(t.commentsV2){if(!Array.isArray(t.commentsV2))throw TypeError(".CommentsV2GetCommentThreadResponse.commentsV2: array expected");for(e.commentsV2=[],n=0;n<t.commentsV2.length;++n){if("object"!=typeof t.commentsV2[n])throw TypeError(".CommentsV2GetCommentThreadResponse.commentsV2: object expected");e.commentsV2[n]=r.CommentDescriptor.fromObject(t.commentsV2[n])}}return null!=t.resolvedAt&&(e.resolvedAt=String(t.resolvedAt)),null!=t.resolvedBy&&(e.resolvedBy=String(t.resolvedBy)),null!=t.context&&(e.context=String(t.context)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),null!=t.deletedAt&&(e.deletedAt=String(t.deletedAt)),null!=t.attributes&&(e.attributes=String(t.attributes)),null!=t.unlinkedAt&&(e.unlinkedAt=String(t.unlinkedAt)),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.comments=[],n.commentsV2=[]),e.defaults&&(n.commentThreadId="",n.resolvedAt="",n.resolvedBy="",n.context="",n.createdAt="",n.deletedAt="",n.attributes="",n.unlinkedAt=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),t.comments&&t.comments.length){n.comments=[];for(var s=0;s<t.comments.length;++s)n.comments[s]=t.comments[s]}if(t.commentsV2&&t.commentsV2.length)for(n.commentsV2=[],s=0;s<t.commentsV2.length;++s)n.commentsV2[s]=r.CommentDescriptor.toObject(t.commentsV2[s],e);return null!=t.resolvedAt&&t.hasOwnProperty("resolvedAt")&&(n.resolvedAt=t.resolvedAt),null!=t.resolvedBy&&t.hasOwnProperty("resolvedBy")&&(n.resolvedBy=t.resolvedBy),null!=t.context&&t.hasOwnProperty("context")&&(n.context=t.context),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),null!=t.deletedAt&&t.hasOwnProperty("deletedAt")&&(n.deletedAt=t.deletedAt),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),null!=t.unlinkedAt&&t.hasOwnProperty("unlinkedAt")&&(n.unlinkedAt=t.unlinkedAt),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2GetCommentThreadResponse"},s}(),r.CommentsV2GetDocumentThreadsResponse=function(){function s(t){if(this.threads=[],this.threadsV2=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.threads=n.emptyArray,s.prototype.threadsV2=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.threads&&t.threads.length)for(var s=0;s<t.threads.length;++s)n.uint32(10).string(t.threads[s]);if(null!=t.threadsV2&&t.threadsV2.length)for(s=0;s<t.threadsV2.length;++s)r.CommentsThreadDescriptor.encode(t.threadsV2[s],n.uint32(18).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2GetDocumentThreadsResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.threads&&i.threads.length||(i.threads=[]),i.threads.push(e.string());break;case 2:i.threadsV2&&i.threadsV2.length||(i.threadsV2=[]),i.threadsV2.push(r.CommentsThreadDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.threads&&t.hasOwnProperty("threads")){if(!Array.isArray(t.threads))return"threads: array expected";for(var e=0;e<t.threads.length;++e)if(!n.isString(t.threads[e]))return"threads: string[] expected"}if(null!=t.threadsV2&&t.hasOwnProperty("threadsV2")){if(!Array.isArray(t.threadsV2))return"threadsV2: array expected";for(e=0;e<t.threadsV2.length;++e){var s=r.CommentsThreadDescriptor.verify(t.threadsV2[e]);if(s)return"threadsV2."+s}}return null},s.fromObject=function(t){if(t instanceof r.CommentsV2GetDocumentThreadsResponse)return t;var e=new r.CommentsV2GetDocumentThreadsResponse;if(t.threads){if(!Array.isArray(t.threads))throw TypeError(".CommentsV2GetDocumentThreadsResponse.threads: array expected");e.threads=[];for(var n=0;n<t.threads.length;++n)e.threads[n]=String(t.threads[n])}if(t.threadsV2){if(!Array.isArray(t.threadsV2))throw TypeError(".CommentsV2GetDocumentThreadsResponse.threadsV2: array expected");for(e.threadsV2=[],n=0;n<t.threadsV2.length;++n){if("object"!=typeof t.threadsV2[n])throw TypeError(".CommentsV2GetDocumentThreadsResponse.threadsV2: object expected");e.threadsV2[n]=r.CommentsThreadDescriptor.fromObject(t.threadsV2[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.threads=[],n.threadsV2=[]),t.threads&&t.threads.length){n.threads=[];for(var s=0;s<t.threads.length;++s)n.threads[s]=t.threads[s]}if(t.threadsV2&&t.threadsV2.length)for(n.threadsV2=[],s=0;s<t.threadsV2.length;++s)n.threadsV2[s]=r.CommentsThreadDescriptor.toObject(t.threadsV2[s],e);return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2GetDocumentThreadsResponse"},s}(),r.KeyValueDescriptor=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.key="",s.prototype.value="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.key&&Object.hasOwnProperty.call(t,"key")&&n.uint32(10).string(t.key),null!=t.value&&Object.hasOwnProperty.call(t,"value")&&n.uint32(18).string(t.value),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.KeyValueDescriptor;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.key=e.string();break;case 2:i.value=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.key&&t.hasOwnProperty("key")&&!n.isString(t.key)?"key: string expected":null!=t.value&&t.hasOwnProperty("value")&&!n.isString(t.value)?"value: string expected":null},s.fromObject=function(t){if(t instanceof r.KeyValueDescriptor)return t;var e=new r.KeyValueDescriptor;return null!=t.key&&(e.key=String(t.key)),null!=t.value&&(e.value=String(t.value)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.key="",n.value=""),null!=t.key&&t.hasOwnProperty("key")&&(n.key=t.key),null!=t.value&&t.hasOwnProperty("value")&&(n.value=t.value),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/KeyValueDescriptor"},s}(),r.IsEditorBundleUploadedMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.bundleVersion="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.bundleVersion&&Object.hasOwnProperty.call(t,"bundleVersion")&&n.uint32(10).string(t.bundleVersion),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.IsEditorBundleUploadedMessage;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?i.bundleVersion=e.string():e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.bundleVersion&&t.hasOwnProperty("bundleVersion")&&!n.isString(t.bundleVersion)?"bundleVersion: string expected":null},s.fromObject=function(t){if(t instanceof r.IsEditorBundleUploadedMessage)return t;var e=new r.IsEditorBundleUploadedMessage;return null!=t.bundleVersion&&(e.bundleVersion=String(t.bundleVersion)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.bundleVersion=""),null!=t.bundleVersion&&t.hasOwnProperty("bundleVersion")&&(n.bundleVersion=t.bundleVersion),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/IsEditorBundleUploadedMessage"},s}(),r.IsEditorBundleUploadedResponse=function(){function n(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return n.prototype.isUploaded=!1,n.create=function(t){return new n(t)},n.encode=function(t,n){return n||(n=e.create()),null!=t.isUploaded&&Object.hasOwnProperty.call(t,"isUploaded")&&n.uint32(8).bool(t.isUploaded),n},n.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},n.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.IsEditorBundleUploadedResponse;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?i.isUploaded=e.bool():e.skipType(7&a)}return i},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.isUploaded&&t.hasOwnProperty("isUploaded")&&"boolean"!=typeof t.isUploaded?"isUploaded: boolean expected":null},n.fromObject=function(t){if(t instanceof r.IsEditorBundleUploadedResponse)return t;var e=new r.IsEditorBundleUploadedResponse;return null!=t.isUploaded&&(e.isUploaded=Boolean(t.isUploaded)),e},n.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.isUploaded=!1),null!=t.isUploaded&&t.hasOwnProperty("isUploaded")&&(n.isUploaded=t.isUploaded),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},n.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/IsEditorBundleUploadedResponse"},n}(),r.RevisionDescriptor=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.revisionId="",s.prototype.name="",s.prototype.creatorId="",s.prototype.authorsIds="",s.prototype.diffData="",s.prototype.createdAt="",s.prototype.attributes="",s.prototype.toVersion=0,s.prototype.fromVersion=0,s.prototype.isEmptyCurrent=!1,s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.revisionId&&Object.hasOwnProperty.call(t,"revisionId")&&n.uint32(10).string(t.revisionId),null!=t.name&&Object.hasOwnProperty.call(t,"name")&&n.uint32(18).string(t.name),null!=t.creatorId&&Object.hasOwnProperty.call(t,"creatorId")&&n.uint32(26).string(t.creatorId),null!=t.authorsIds&&Object.hasOwnProperty.call(t,"authorsIds")&&n.uint32(34).string(t.authorsIds),null!=t.diffData&&Object.hasOwnProperty.call(t,"diffData")&&n.uint32(42).string(t.diffData),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(50).string(t.createdAt),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(58).string(t.attributes),null!=t.toVersion&&Object.hasOwnProperty.call(t,"toVersion")&&n.uint32(64).uint32(t.toVersion),null!=t.fromVersion&&Object.hasOwnProperty.call(t,"fromVersion")&&n.uint32(72).uint32(t.fromVersion),null!=t.isEmptyCurrent&&Object.hasOwnProperty.call(t,"isEmptyCurrent")&&n.uint32(80).bool(t.isEmptyCurrent),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.RevisionDescriptor;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.revisionId=e.string();break;case 2:i.name=e.string();break;case 3:i.creatorId=e.string();break;case 4:i.authorsIds=e.string();break;case 5:i.diffData=e.string();break;case 6:i.createdAt=e.string();break;case 7:i.attributes=e.string();break;case 8:i.toVersion=e.uint32();break;case 9:i.fromVersion=e.uint32();break;case 10:i.isEmptyCurrent=e.bool();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.revisionId&&t.hasOwnProperty("revisionId")&&!n.isString(t.revisionId)?"revisionId: string expected":null!=t.name&&t.hasOwnProperty("name")&&!n.isString(t.name)?"name: string expected":null!=t.creatorId&&t.hasOwnProperty("creatorId")&&!n.isString(t.creatorId)?"creatorId: string expected":null!=t.authorsIds&&t.hasOwnProperty("authorsIds")&&!n.isString(t.authorsIds)?"authorsIds: string expected":null!=t.diffData&&t.hasOwnProperty("diffData")&&!n.isString(t.diffData)?"diffData: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null!=t.toVersion&&t.hasOwnProperty("toVersion")&&!n.isInteger(t.toVersion)?"toVersion: integer expected":null!=t.fromVersion&&t.hasOwnProperty("fromVersion")&&!n.isInteger(t.fromVersion)?"fromVersion: integer expected":null!=t.isEmptyCurrent&&t.hasOwnProperty("isEmptyCurrent")&&"boolean"!=typeof t.isEmptyCurrent?"isEmptyCurrent: boolean expected":null},s.fromObject=function(t){if(t instanceof r.RevisionDescriptor)return t;var e=new r.RevisionDescriptor;return null!=t.revisionId&&(e.revisionId=String(t.revisionId)),null!=t.name&&(e.name=String(t.name)),null!=t.creatorId&&(e.creatorId=String(t.creatorId)),null!=t.authorsIds&&(e.authorsIds=String(t.authorsIds)),null!=t.diffData&&(e.diffData=String(t.diffData)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),null!=t.attributes&&(e.attributes=String(t.attributes)),null!=t.toVersion&&(e.toVersion=t.toVersion>>>0),null!=t.fromVersion&&(e.fromVersion=t.fromVersion>>>0),null!=t.isEmptyCurrent&&(e.isEmptyCurrent=Boolean(t.isEmptyCurrent)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.revisionId="",n.name="",n.creatorId="",n.authorsIds="",n.diffData="",n.createdAt="",n.attributes="",n.toVersion=0,n.fromVersion=0,n.isEmptyCurrent=!1),null!=t.revisionId&&t.hasOwnProperty("revisionId")&&(n.revisionId=t.revisionId),null!=t.name&&t.hasOwnProperty("name")&&(n.name=t.name),null!=t.creatorId&&t.hasOwnProperty("creatorId")&&(n.creatorId=t.creatorId),null!=t.authorsIds&&t.hasOwnProperty("authorsIds")&&(n.authorsIds=t.authorsIds),null!=t.diffData&&t.hasOwnProperty("diffData")&&(n.diffData=t.diffData),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),null!=t.toVersion&&t.hasOwnProperty("toVersion")&&(n.toVersion=t.toVersion),null!=t.fromVersion&&t.hasOwnProperty("fromVersion")&&(n.fromVersion=t.fromVersion),null!=t.isEmptyCurrent&&t.hasOwnProperty("isEmptyCurrent")&&(n.isEmptyCurrent=t.isEmptyCurrent),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/RevisionDescriptor"},s}(),r.RevisionHistoryConnectMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.documentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(10).string(t.documentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.RevisionHistoryConnectMessage;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?i.documentId=e.string():e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null},s.fromObject=function(t){if(t instanceof r.RevisionHistoryConnectMessage)return t;var e=new r.RevisionHistoryConnectMessage;return null!=t.documentId&&(e.documentId=String(t.documentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.documentId=""),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/RevisionHistoryConnectMessage"},s}(),r.RevisionHistoryGetRevisionMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.documentId="",s.prototype.revisionId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(10).string(t.documentId),null!=t.revisionId&&Object.hasOwnProperty.call(t,"revisionId")&&n.uint32(18).string(t.revisionId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.RevisionHistoryGetRevisionMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.documentId=e.string();break;case 2:i.revisionId=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null!=t.revisionId&&t.hasOwnProperty("revisionId")&&!n.isString(t.revisionId)?"revisionId: string expected":null},s.fromObject=function(t){if(t instanceof r.RevisionHistoryGetRevisionMessage)return t;var e=new r.RevisionHistoryGetRevisionMessage;return null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.revisionId&&(e.revisionId=String(t.revisionId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.documentId="",n.revisionId=""),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.revisionId&&t.hasOwnProperty("revisionId")&&(n.revisionId=t.revisionId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/RevisionHistoryGetRevisionMessage"},s}(),r.RevisionHistoryReconnectMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.documentId="",s.prototype.requestId=0,s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(10).string(t.documentId),null!=t.requestId&&Object.hasOwnProperty.call(t,"requestId")&&n.uint32(16).uint32(t.requestId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.RevisionHistoryReconnectMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.documentId=e.string();break;case 2:i.requestId=e.uint32();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null!=t.requestId&&t.hasOwnProperty("requestId")&&!n.isInteger(t.requestId)?"requestId: integer expected":null},s.fromObject=function(t){if(t instanceof r.RevisionHistoryReconnectMessage)return t;var e=new r.RevisionHistoryReconnectMessage;return null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.requestId&&(e.requestId=t.requestId>>>0),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.documentId="",n.requestId=0),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.requestId&&t.hasOwnProperty("requestId")&&(n.requestId=t.requestId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/RevisionHistoryReconnectMessage"},s}(),r.RevisionHistoryUpdateRevisionsMessage=function(){function s(t){if(this.revisions=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.documentId="",s.prototype.requestId=0,s.prototype.revisions=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(10).string(t.documentId),null!=t.requestId&&Object.hasOwnProperty.call(t,"requestId")&&n.uint32(16).uint32(t.requestId),null!=t.revisions&&t.revisions.length)for(var s=0;s<t.revisions.length;++s)r.RevisionDescriptor.encode(t.revisions[s],n.uint32(26).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.RevisionHistoryUpdateRevisionsMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.documentId=e.string();break;case 2:i.requestId=e.uint32();break;case 3:i.revisions&&i.revisions.length||(i.revisions=[]),i.revisions.push(r.RevisionDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId))return"documentId: string expected";if(null!=t.requestId&&t.hasOwnProperty("requestId")&&!n.isInteger(t.requestId))return"requestId: integer expected";if(null!=t.revisions&&t.hasOwnProperty("revisions")){if(!Array.isArray(t.revisions))return"revisions: array expected";for(var e=0;e<t.revisions.length;++e){var s=r.RevisionDescriptor.verify(t.revisions[e]);if(s)return"revisions."+s}}return null},s.fromObject=function(t){if(t instanceof r.RevisionHistoryUpdateRevisionsMessage)return t;var e=new r.RevisionHistoryUpdateRevisionsMessage;if(null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.requestId&&(e.requestId=t.requestId>>>0),t.revisions){if(!Array.isArray(t.revisions))throw TypeError(".RevisionHistoryUpdateRevisionsMessage.revisions: array expected");e.revisions=[];for(var n=0;n<t.revisions.length;++n){if("object"!=typeof t.revisions[n])throw TypeError(".RevisionHistoryUpdateRevisionsMessage.revisions: object expected");e.revisions[n]=r.RevisionDescriptor.fromObject(t.revisions[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.revisions=[]),e.defaults&&(n.documentId="",n.requestId=0),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.requestId&&t.hasOwnProperty("requestId")&&(n.requestId=t.requestId),t.revisions&&t.revisions.length){n.revisions=[];for(var s=0;s<t.revisions.length;++s)n.revisions[s]=r.RevisionDescriptor.toObject(t.revisions[s],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/RevisionHistoryUpdateRevisionsMessage"},s}(),r.RevisionHistoryConnectResponse=function(){function s(t){if(this.revisions=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.channel="",s.prototype.requestId=0,s.prototype.revisions=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.channel&&Object.hasOwnProperty.call(t,"channel")&&n.uint32(10).string(t.channel),null!=t.requestId&&Object.hasOwnProperty.call(t,"requestId")&&n.uint32(16).uint32(t.requestId),null!=t.revisions&&t.revisions.length)for(var s=0;s<t.revisions.length;++s)r.RevisionDescriptor.encode(t.revisions[s],n.uint32(26).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.RevisionHistoryConnectResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.channel=e.string();break;case 2:i.requestId=e.uint32();break;case 3:i.revisions&&i.revisions.length||(i.revisions=[]),i.revisions.push(r.RevisionDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.channel&&t.hasOwnProperty("channel")&&!n.isString(t.channel))return"channel: string expected";if(null!=t.requestId&&t.hasOwnProperty("requestId")&&!n.isInteger(t.requestId))return"requestId: integer expected";if(null!=t.revisions&&t.hasOwnProperty("revisions")){if(!Array.isArray(t.revisions))return"revisions: array expected";for(var e=0;e<t.revisions.length;++e){var s=r.RevisionDescriptor.verify(t.revisions[e]);if(s)return"revisions."+s}}return null},s.fromObject=function(t){if(t instanceof r.RevisionHistoryConnectResponse)return t;var e=new r.RevisionHistoryConnectResponse;if(null!=t.channel&&(e.channel=String(t.channel)),null!=t.requestId&&(e.requestId=t.requestId>>>0),t.revisions){if(!Array.isArray(t.revisions))throw TypeError(".RevisionHistoryConnectResponse.revisions: array expected");e.revisions=[];for(var n=0;n<t.revisions.length;++n){if("object"!=typeof t.revisions[n])throw TypeError(".RevisionHistoryConnectResponse.revisions: object expected");e.revisions[n]=r.RevisionDescriptor.fromObject(t.revisions[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.revisions=[]),e.defaults&&(n.channel="",n.requestId=0),null!=t.channel&&t.hasOwnProperty("channel")&&(n.channel=t.channel),null!=t.requestId&&t.hasOwnProperty("requestId")&&(n.requestId=t.requestId),t.revisions&&t.revisions.length){n.revisions=[];for(var s=0;s<t.revisions.length;++s)n.revisions[s]=r.RevisionDescriptor.toObject(t.revisions[s],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/RevisionHistoryConnectResponse"},s}(),r.RevisionHistoryGetRevisionResponse=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.revisionId="",s.prototype.name="",s.prototype.creatorId="",s.prototype.authorsIds="",s.prototype.diffData="",s.prototype.createdAt="",s.prototype.attributes="",s.prototype.toVersion=0,s.prototype.fromVersion=0,s.prototype.isEmptyCurrent=!1,s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.revisionId&&Object.hasOwnProperty.call(t,"revisionId")&&n.uint32(10).string(t.revisionId),null!=t.name&&Object.hasOwnProperty.call(t,"name")&&n.uint32(18).string(t.name),null!=t.creatorId&&Object.hasOwnProperty.call(t,"creatorId")&&n.uint32(26).string(t.creatorId),null!=t.authorsIds&&Object.hasOwnProperty.call(t,"authorsIds")&&n.uint32(34).string(t.authorsIds),null!=t.diffData&&Object.hasOwnProperty.call(t,"diffData")&&n.uint32(42).string(t.diffData),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(50).string(t.createdAt),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(58).string(t.attributes),null!=t.toVersion&&Object.hasOwnProperty.call(t,"toVersion")&&n.uint32(64).uint32(t.toVersion),null!=t.fromVersion&&Object.hasOwnProperty.call(t,"fromVersion")&&n.uint32(72).uint32(t.fromVersion),null!=t.isEmptyCurrent&&Object.hasOwnProperty.call(t,"isEmptyCurrent")&&n.uint32(80).bool(t.isEmptyCurrent),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.RevisionHistoryGetRevisionResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.revisionId=e.string();break;case 2:i.name=e.string();break;case 3:i.creatorId=e.string();break;case 4:i.authorsIds=e.string();break;case 5:i.diffData=e.string();break;case 6:i.createdAt=e.string();break;case 7:i.attributes=e.string();break;case 8:i.toVersion=e.uint32();break;case 9:i.fromVersion=e.uint32();break;case 10:i.isEmptyCurrent=e.bool();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.revisionId&&t.hasOwnProperty("revisionId")&&!n.isString(t.revisionId)?"revisionId: string expected":null!=t.name&&t.hasOwnProperty("name")&&!n.isString(t.name)?"name: string expected":null!=t.creatorId&&t.hasOwnProperty("creatorId")&&!n.isString(t.creatorId)?"creatorId: string expected":null!=t.authorsIds&&t.hasOwnProperty("authorsIds")&&!n.isString(t.authorsIds)?"authorsIds: string expected":null!=t.diffData&&t.hasOwnProperty("diffData")&&!n.isString(t.diffData)?"diffData: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null!=t.toVersion&&t.hasOwnProperty("toVersion")&&!n.isInteger(t.toVersion)?"toVersion: integer expected":null!=t.fromVersion&&t.hasOwnProperty("fromVersion")&&!n.isInteger(t.fromVersion)?"fromVersion: integer expected":null!=t.isEmptyCurrent&&t.hasOwnProperty("isEmptyCurrent")&&"boolean"!=typeof t.isEmptyCurrent?"isEmptyCurrent: boolean expected":null},s.fromObject=function(t){if(t instanceof r.RevisionHistoryGetRevisionResponse)return t;var e=new r.RevisionHistoryGetRevisionResponse;return null!=t.revisionId&&(e.revisionId=String(t.revisionId)),null!=t.name&&(e.name=String(t.name)),null!=t.creatorId&&(e.creatorId=String(t.creatorId)),null!=t.authorsIds&&(e.authorsIds=String(t.authorsIds)),null!=t.diffData&&(e.diffData=String(t.diffData)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),null!=t.attributes&&(e.attributes=String(t.attributes)),null!=t.toVersion&&(e.toVersion=t.toVersion>>>0),null!=t.fromVersion&&(e.fromVersion=t.fromVersion>>>0),null!=t.isEmptyCurrent&&(e.isEmptyCurrent=Boolean(t.isEmptyCurrent)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.revisionId="",n.name="",n.creatorId="",n.authorsIds="",n.diffData="",n.createdAt="",n.attributes="",n.toVersion=0,n.fromVersion=0,n.isEmptyCurrent=!1),null!=t.revisionId&&t.hasOwnProperty("revisionId")&&(n.revisionId=t.revisionId),null!=t.name&&t.hasOwnProperty("name")&&(n.name=t.name),null!=t.creatorId&&t.hasOwnProperty("creatorId")&&(n.creatorId=t.creatorId),null!=t.authorsIds&&t.hasOwnProperty("authorsIds")&&(n.authorsIds=t.authorsIds),null!=t.diffData&&t.hasOwnProperty("diffData")&&(n.diffData=t.diffData),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),null!=t.toVersion&&t.hasOwnProperty("toVersion")&&(n.toVersion=t.toVersion),null!=t.fromVersion&&t.hasOwnProperty("fromVersion")&&(n.fromVersion=t.fromVersion),null!=t.isEmptyCurrent&&t.hasOwnProperty("isEmptyCurrent")&&(n.isEmptyCurrent=t.isEmptyCurrent),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/RevisionHistoryGetRevisionResponse"},s}(),r.RevisionHistoryUpdateRevisionsResponse=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.requestId=0,s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.requestId&&Object.hasOwnProperty.call(t,"requestId")&&n.uint32(8).uint32(t.requestId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.RevisionHistoryUpdateRevisionsResponse;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?i.requestId=e.uint32():e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.requestId&&t.hasOwnProperty("requestId")&&!n.isInteger(t.requestId)?"requestId: integer expected":null},s.fromObject=function(t){if(t instanceof r.RevisionHistoryUpdateRevisionsResponse)return t;var e=new r.RevisionHistoryUpdateRevisionsResponse;return null!=t.requestId&&(e.requestId=t.requestId>>>0),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.requestId=0),null!=t.requestId&&t.hasOwnProperty("requestId")&&(n.requestId=t.requestId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/RevisionHistoryUpdateRevisionsResponse"},s}(),r.SessionsSocketDescriptor=function(){function s(t){if(this.permissions=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.session="",s.prototype.user="",s.prototype.role="",s.prototype.permissions=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.session&&Object.hasOwnProperty.call(t,"session")&&n.uint32(10).string(t.session),null!=t.user&&Object.hasOwnProperty.call(t,"user")&&n.uint32(18).string(t.user),null!=t.role&&Object.hasOwnProperty.call(t,"role")&&n.uint32(26).string(t.role),null!=t.permissions&&t.permissions.length)for(var r=0;r<t.permissions.length;++r)n.uint32(34).string(t.permissions[r]);return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.SessionsSocketDescriptor;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.session=e.string();break;case 2:i.user=e.string();break;case 3:i.role=e.string();break;case 4:i.permissions&&i.permissions.length||(i.permissions=[]),i.permissions.push(e.string());break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.session&&t.hasOwnProperty("session")&&!n.isString(t.session))return"session: string expected";if(null!=t.user&&t.hasOwnProperty("user")&&!n.isString(t.user))return"user: string expected";if(null!=t.role&&t.hasOwnProperty("role")&&!n.isString(t.role))return"role: string expected";if(null!=t.permissions&&t.hasOwnProperty("permissions")){if(!Array.isArray(t.permissions))return"permissions: array expected";for(var e=0;e<t.permissions.length;++e)if(!n.isString(t.permissions[e]))return"permissions: string[] expected"}return null},s.fromObject=function(t){if(t instanceof r.SessionsSocketDescriptor)return t;var e=new r.SessionsSocketDescriptor;if(null!=t.session&&(e.session=String(t.session)),null!=t.user&&(e.user=String(t.user)),null!=t.role&&(e.role=String(t.role)),t.permissions){if(!Array.isArray(t.permissions))throw TypeError(".SessionsSocketDescriptor.permissions: array expected");e.permissions=[];for(var n=0;n<t.permissions.length;++n)e.permissions[n]=String(t.permissions[n])}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.permissions=[]),e.defaults&&(n.session="",n.user="",n.role=""),null!=t.session&&t.hasOwnProperty("session")&&(n.session=t.session),null!=t.user&&t.hasOwnProperty("user")&&(n.user=t.user),null!=t.role&&t.hasOwnProperty("role")&&(n.role=t.role),t.permissions&&t.permissions.length){n.permissions=[];for(var r=0;r<t.permissions.length;++r)n.permissions[r]=t.permissions[r]}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/SessionsSocketDescriptor"},s}(),r.SessionsConnectMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.sessionType=0,s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.sessionType&&Object.hasOwnProperty.call(t,"sessionType")&&n.uint32(16).uint32(t.sessionType),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.SessionsConnectMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.sessionType=e.uint32();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id)?"id: string expected":null!=t.sessionType&&t.hasOwnProperty("sessionType")&&!n.isInteger(t.sessionType)?"sessionType: integer expected":null},s.fromObject=function(t){if(t instanceof r.SessionsConnectMessage)return t;var e=new r.SessionsConnectMessage;return null!=t.id&&(e.id=String(t.id)),null!=t.sessionType&&(e.sessionType=t.sessionType>>>0),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.id="",n.sessionType=0),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),null!=t.sessionType&&t.hasOwnProperty("sessionType")&&(n.sessionType=t.sessionType),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/SessionsConnectMessage"},s}(),r.SocketConnectMessage=function(){function s(t){if(this.permissions=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.userId="",s.prototype.role="",s.prototype.permissions=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.userId&&Object.hasOwnProperty.call(t,"userId")&&n.uint32(18).string(t.userId),null!=t.role&&Object.hasOwnProperty.call(t,"role")&&n.uint32(26).string(t.role),null!=t.permissions&&t.permissions.length)for(var r=0;r<t.permissions.length;++r)n.uint32(34).string(t.permissions[r]);return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.SocketConnectMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.userId=e.string();break;case 3:i.role=e.string();break;case 4:i.permissions&&i.permissions.length||(i.permissions=[]),i.permissions.push(e.string());break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id))return"id: string expected";if(null!=t.userId&&t.hasOwnProperty("userId")&&!n.isString(t.userId))return"userId: string expected";if(null!=t.role&&t.hasOwnProperty("role")&&!n.isString(t.role))return"role: string expected";if(null!=t.permissions&&t.hasOwnProperty("permissions")){if(!Array.isArray(t.permissions))return"permissions: array expected";for(var e=0;e<t.permissions.length;++e)if(!n.isString(t.permissions[e]))return"permissions: string[] expected"}return null},s.fromObject=function(t){if(t instanceof r.SocketConnectMessage)return t;var e=new r.SocketConnectMessage;if(null!=t.id&&(e.id=String(t.id)),null!=t.userId&&(e.userId=String(t.userId)),null!=t.role&&(e.role=String(t.role)),t.permissions){if(!Array.isArray(t.permissions))throw TypeError(".SocketConnectMessage.permissions: array expected");e.permissions=[];for(var n=0;n<t.permissions.length;++n)e.permissions[n]=String(t.permissions[n])}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.permissions=[]),e.defaults&&(n.id="",n.userId="",n.role=""),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),null!=t.userId&&t.hasOwnProperty("userId")&&(n.userId=t.userId),null!=t.role&&t.hasOwnProperty("role")&&(n.role=t.role),t.permissions&&t.permissions.length){n.permissions=[];for(var r=0;r<t.permissions.length;++r)n.permissions[r]=t.permissions[r]}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/SocketConnectMessage"},s}(),r.SocketDisconnectMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.SocketDisconnectMessage;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?i.id=e.string():e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id)?"id: string expected":null},s.fromObject=function(t){if(t instanceof r.SocketDisconnectMessage)return t;var e=new r.SocketDisconnectMessage;return null!=t.id&&(e.id=String(t.id)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.id=""),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/SocketDisconnectMessage"},s}(),r.SessionsConnectResponse=function(){function s(t){if(this.sockets=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.channel="",s.prototype.sockets=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.channel&&Object.hasOwnProperty.call(t,"channel")&&n.uint32(10).string(t.channel),null!=t.sockets&&t.sockets.length)for(var s=0;s<t.sockets.length;++s)r.SessionsSocketDescriptor.encode(t.sockets[s],n.uint32(18).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.SessionsConnectResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.channel=e.string();break;case 2:i.sockets&&i.sockets.length||(i.sockets=[]),i.sockets.push(r.SessionsSocketDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.channel&&t.hasOwnProperty("channel")&&!n.isString(t.channel))return"channel: string expected";if(null!=t.sockets&&t.hasOwnProperty("sockets")){if(!Array.isArray(t.sockets))return"sockets: array expected";for(var e=0;e<t.sockets.length;++e){var s=r.SessionsSocketDescriptor.verify(t.sockets[e]);if(s)return"sockets."+s}}return null},s.fromObject=function(t){if(t instanceof r.SessionsConnectResponse)return t;var e=new r.SessionsConnectResponse;if(null!=t.channel&&(e.channel=String(t.channel)),t.sockets){if(!Array.isArray(t.sockets))throw TypeError(".SessionsConnectResponse.sockets: array expected");e.sockets=[];for(var n=0;n<t.sockets.length;++n){if("object"!=typeof t.sockets[n])throw TypeError(".SessionsConnectResponse.sockets: object expected");e.sockets[n]=r.SessionsSocketDescriptor.fromObject(t.sockets[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.sockets=[]),e.defaults&&(n.channel=""),null!=t.channel&&t.hasOwnProperty("channel")&&(n.channel=t.channel),t.sockets&&t.sockets.length){n.sockets=[];for(var s=0;s<t.sockets.length;++s)n.sockets[s]=r.SessionsSocketDescriptor.toObject(t.sockets[s],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/SessionsConnectResponse"},s}(),r.SuggestionDescriptor=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.authorId="",s.prototype.type="",s.prototype.createdAt="",s.prototype.data="",s.prototype.hasComments=!1,s.prototype.state="",s.prototype.attributes="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.authorId&&Object.hasOwnProperty.call(t,"authorId")&&n.uint32(18).string(t.authorId),null!=t.type&&Object.hasOwnProperty.call(t,"type")&&n.uint32(26).string(t.type),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(34).string(t.createdAt),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(42).string(t.data),null!=t.hasComments&&Object.hasOwnProperty.call(t,"hasComments")&&n.uint32(48).bool(t.hasComments),null!=t.state&&Object.hasOwnProperty.call(t,"state")&&n.uint32(58).string(t.state),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(66).string(t.attributes),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.SuggestionDescriptor;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.authorId=e.string();break;case 3:i.type=e.string();break;case 4:i.createdAt=e.string();break;case 5:i.data=e.string();break;case 6:i.hasComments=e.bool();break;case 7:i.state=e.string();break;case 8:i.attributes=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id)?"id: string expected":null!=t.authorId&&t.hasOwnProperty("authorId")&&!n.isString(t.authorId)?"authorId: string expected":null!=t.type&&t.hasOwnProperty("type")&&!n.isString(t.type)?"type: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isString(t.data)?"data: string expected":null!=t.hasComments&&t.hasOwnProperty("hasComments")&&"boolean"!=typeof t.hasComments?"hasComments: boolean expected":null!=t.state&&t.hasOwnProperty("state")&&!n.isString(t.state)?"state: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null},s.fromObject=function(t){if(t instanceof r.SuggestionDescriptor)return t;var e=new r.SuggestionDescriptor;return null!=t.id&&(e.id=String(t.id)),null!=t.authorId&&(e.authorId=String(t.authorId)),null!=t.type&&(e.type=String(t.type)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),null!=t.data&&(e.data=String(t.data)),null!=t.hasComments&&(e.hasComments=Boolean(t.hasComments)),null!=t.state&&(e.state=String(t.state)),null!=t.attributes&&(e.attributes=String(t.attributes)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.id="",n.authorId="",n.type="",n.createdAt="",n.data="",n.hasComments=!1,n.state="",n.attributes=""),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),null!=t.authorId&&t.hasOwnProperty("authorId")&&(n.authorId=t.authorId),null!=t.type&&t.hasOwnProperty("type")&&(n.type=t.type),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.hasComments&&t.hasOwnProperty("hasComments")&&(n.hasComments=t.hasComments),null!=t.state&&t.hasOwnProperty("state")&&(n.state=t.state),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/SuggestionDescriptor"},s}(),r.TrackChangesAddSuggestionMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.documentId="",s.prototype.type="",s.prototype.data="",s.prototype.originalSuggestionId="",s.prototype.attributes="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(18).string(t.documentId),null!=t.type&&Object.hasOwnProperty.call(t,"type")&&n.uint32(26).string(t.type),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(34).string(t.data),null!=t.originalSuggestionId&&Object.hasOwnProperty.call(t,"originalSuggestionId")&&n.uint32(42).string(t.originalSuggestionId),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(50).string(t.attributes),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.TrackChangesAddSuggestionMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.documentId=e.string();break;case 3:i.type=e.string();break;case 4:i.data=e.string();break;case 5:i.originalSuggestionId=e.string();break;case 6:i.attributes=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id)?"id: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null!=t.type&&t.hasOwnProperty("type")&&!n.isString(t.type)?"type: string expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isString(t.data)?"data: string expected":null!=t.originalSuggestionId&&t.hasOwnProperty("originalSuggestionId")&&!n.isString(t.originalSuggestionId)?"originalSuggestionId: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null},s.fromObject=function(t){if(t instanceof r.TrackChangesAddSuggestionMessage)return t;var e=new r.TrackChangesAddSuggestionMessage;return null!=t.id&&(e.id=String(t.id)),null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.type&&(e.type=String(t.type)),null!=t.data&&(e.data=String(t.data)),null!=t.originalSuggestionId&&(e.originalSuggestionId=String(t.originalSuggestionId)),null!=t.attributes&&(e.attributes=String(t.attributes)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.id="",n.documentId="",n.type="",n.data="",n.originalSuggestionId="",n.attributes=""),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.type&&t.hasOwnProperty("type")&&(n.type=t.type),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.originalSuggestionId&&t.hasOwnProperty("originalSuggestionId")&&(n.originalSuggestionId=t.originalSuggestionId),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/TrackChangesAddSuggestionMessage"},s}(),r.TrackChangesBatchUpdateSuggestionsStateMessage=function(){function s(t){if(this.ids=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.ids=n.emptyArray,s.prototype.documentId="",s.prototype.state="",s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.ids&&t.ids.length)for(var r=0;r<t.ids.length;++r)n.uint32(10).string(t.ids[r]);return null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(18).string(t.documentId),null!=t.state&&Object.hasOwnProperty.call(t,"state")&&n.uint32(26).string(t.state),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.TrackChangesBatchUpdateSuggestionsStateMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.ids&&i.ids.length||(i.ids=[]),i.ids.push(e.string());break;case 2:i.documentId=e.string();break;case 3:i.state=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.ids&&t.hasOwnProperty("ids")){if(!Array.isArray(t.ids))return"ids: array expected";for(var e=0;e<t.ids.length;++e)if(!n.isString(t.ids[e]))return"ids: string[] expected"}return null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null!=t.state&&t.hasOwnProperty("state")&&!n.isString(t.state)?"state: string expected":null},s.fromObject=function(t){if(t instanceof r.TrackChangesBatchUpdateSuggestionsStateMessage)return t;var e=new r.TrackChangesBatchUpdateSuggestionsStateMessage;if(t.ids){if(!Array.isArray(t.ids))throw TypeError(".TrackChangesBatchUpdateSuggestionsStateMessage.ids: array expected");e.ids=[];for(var n=0;n<t.ids.length;++n)e.ids[n]=String(t.ids[n])}return null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.state&&(e.state=String(t.state)),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.ids=[]),e.defaults&&(n.documentId="",n.state=""),t.ids&&t.ids.length){n.ids=[];for(var r=0;r<t.ids.length;++r)n.ids[r]=t.ids[r]}return null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.state&&t.hasOwnProperty("state")&&(n.state=t.state),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/TrackChangesBatchUpdateSuggestionsStateMessage"},s}(),r.TrackChangesConnectMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.documentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(10).string(t.documentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.TrackChangesConnectMessage;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?i.documentId=e.string():e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null},s.fromObject=function(t){if(t instanceof r.TrackChangesConnectMessage)return t;var e=new r.TrackChangesConnectMessage;return null!=t.documentId&&(e.documentId=String(t.documentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.documentId=""),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/TrackChangesConnectMessage"},s}(),r.TrackChangesGetAllSuggestionMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.documentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(10).string(t.documentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.TrackChangesGetAllSuggestionMessage;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?i.documentId=e.string():e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null},s.fromObject=function(t){if(t instanceof r.TrackChangesGetAllSuggestionMessage)return t;var e=new r.TrackChangesGetAllSuggestionMessage;return null!=t.documentId&&(e.documentId=String(t.documentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.documentId=""),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/TrackChangesGetAllSuggestionMessage"},s}(),r.TrackChangesGetSuggestionMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.documentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(18).string(t.documentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.TrackChangesGetSuggestionMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.documentId=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id)?"id: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null},s.fromObject=function(t){if(t instanceof r.TrackChangesGetSuggestionMessage)return t;var e=new r.TrackChangesGetSuggestionMessage;return null!=t.id&&(e.id=String(t.id)),null!=t.documentId&&(e.documentId=String(t.documentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.id="",n.documentId=""),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/TrackChangesGetSuggestionMessage"},s}(),r.TrackChangesUpdateSuggestionMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.documentId="",s.prototype.hasComments=!1,s.prototype.isHasCommentsModified=!1,s.prototype.state="",s.prototype.attributes="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(18).string(t.documentId),null!=t.hasComments&&Object.hasOwnProperty.call(t,"hasComments")&&n.uint32(24).bool(t.hasComments),null!=t.isHasCommentsModified&&Object.hasOwnProperty.call(t,"isHasCommentsModified")&&n.uint32(32).bool(t.isHasCommentsModified),null!=t.state&&Object.hasOwnProperty.call(t,"state")&&n.uint32(42).string(t.state),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(50).string(t.attributes),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.TrackChangesUpdateSuggestionMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.documentId=e.string();break;case 3:i.hasComments=e.bool();break;case 4:i.isHasCommentsModified=e.bool();break;case 5:i.state=e.string();break;case 6:i.attributes=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id)?"id: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null!=t.hasComments&&t.hasOwnProperty("hasComments")&&"boolean"!=typeof t.hasComments?"hasComments: boolean expected":null!=t.isHasCommentsModified&&t.hasOwnProperty("isHasCommentsModified")&&"boolean"!=typeof t.isHasCommentsModified?"isHasCommentsModified: boolean expected":null!=t.state&&t.hasOwnProperty("state")&&!n.isString(t.state)?"state: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null},s.fromObject=function(t){if(t instanceof r.TrackChangesUpdateSuggestionMessage)return t;var e=new r.TrackChangesUpdateSuggestionMessage;return null!=t.id&&(e.id=String(t.id)),null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.hasComments&&(e.hasComments=Boolean(t.hasComments)),null!=t.isHasCommentsModified&&(e.isHasCommentsModified=Boolean(t.isHasCommentsModified)),null!=t.state&&(e.state=String(t.state)),null!=t.attributes&&(e.attributes=String(t.attributes)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.id="",n.documentId="",n.hasComments=!1,n.isHasCommentsModified=!1,n.state="",n.attributes=""),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.hasComments&&t.hasOwnProperty("hasComments")&&(n.hasComments=t.hasComments),null!=t.isHasCommentsModified&&t.hasOwnProperty("isHasCommentsModified")&&(n.isHasCommentsModified=t.isHasCommentsModified),null!=t.state&&t.hasOwnProperty("state")&&(n.state=t.state),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/TrackChangesUpdateSuggestionMessage"},s}(),r.TrackChangesAddSuggestionResponse=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.authorId="",s.prototype.type="",s.prototype.createdAt="",s.prototype.data="",s.prototype.hasComments=!1,s.prototype.state="",s.prototype.attributes="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.authorId&&Object.hasOwnProperty.call(t,"authorId")&&n.uint32(18).string(t.authorId),null!=t.type&&Object.hasOwnProperty.call(t,"type")&&n.uint32(26).string(t.type),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(34).string(t.createdAt),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(42).string(t.data),null!=t.hasComments&&Object.hasOwnProperty.call(t,"hasComments")&&n.uint32(48).bool(t.hasComments),null!=t.state&&Object.hasOwnProperty.call(t,"state")&&n.uint32(58).string(t.state),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(66).string(t.attributes),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.TrackChangesAddSuggestionResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.authorId=e.string();break;case 3:i.type=e.string();break;case 4:i.createdAt=e.string();break;case 5:i.data=e.string();break;case 6:i.hasComments=e.bool();break;case 7:i.state=e.string();break;case 8:i.attributes=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id)?"id: string expected":null!=t.authorId&&t.hasOwnProperty("authorId")&&!n.isString(t.authorId)?"authorId: string expected":null!=t.type&&t.hasOwnProperty("type")&&!n.isString(t.type)?"type: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isString(t.data)?"data: string expected":null!=t.hasComments&&t.hasOwnProperty("hasComments")&&"boolean"!=typeof t.hasComments?"hasComments: boolean expected":null!=t.state&&t.hasOwnProperty("state")&&!n.isString(t.state)?"state: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null},s.fromObject=function(t){if(t instanceof r.TrackChangesAddSuggestionResponse)return t;var e=new r.TrackChangesAddSuggestionResponse;return null!=t.id&&(e.id=String(t.id)),null!=t.authorId&&(e.authorId=String(t.authorId)),null!=t.type&&(e.type=String(t.type)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),null!=t.data&&(e.data=String(t.data)),null!=t.hasComments&&(e.hasComments=Boolean(t.hasComments)),null!=t.state&&(e.state=String(t.state)),null!=t.attributes&&(e.attributes=String(t.attributes)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.id="",n.authorId="",n.type="",n.createdAt="",n.data="",n.hasComments=!1,n.state="",n.attributes=""),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),null!=t.authorId&&t.hasOwnProperty("authorId")&&(n.authorId=t.authorId),null!=t.type&&t.hasOwnProperty("type")&&(n.type=t.type),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.hasComments&&t.hasOwnProperty("hasComments")&&(n.hasComments=t.hasComments),null!=t.state&&t.hasOwnProperty("state")&&(n.state=t.state),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/TrackChangesAddSuggestionResponse"},s}(),r.TrackChangesConnectResponse=function(){function s(t){if(this.suggestions=[],this.suggestionsV2=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.channel="",s.prototype.suggestions=n.emptyArray,s.prototype.suggestionsV2=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.channel&&Object.hasOwnProperty.call(t,"channel")&&n.uint32(10).string(t.channel),null!=t.suggestions&&t.suggestions.length)for(var s=0;s<t.suggestions.length;++s)n.uint32(18).string(t.suggestions[s]);if(null!=t.suggestionsV2&&t.suggestionsV2.length)for(s=0;s<t.suggestionsV2.length;++s)r.SuggestionDescriptor.encode(t.suggestionsV2[s],n.uint32(26).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.TrackChangesConnectResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.channel=e.string();break;case 2:i.suggestions&&i.suggestions.length||(i.suggestions=[]),i.suggestions.push(e.string());break;case 3:i.suggestionsV2&&i.suggestionsV2.length||(i.suggestionsV2=[]),i.suggestionsV2.push(r.SuggestionDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.channel&&t.hasOwnProperty("channel")&&!n.isString(t.channel))return"channel: string expected";if(null!=t.suggestions&&t.hasOwnProperty("suggestions")){if(!Array.isArray(t.suggestions))return"suggestions: array expected";for(var e=0;e<t.suggestions.length;++e)if(!n.isString(t.suggestions[e]))return"suggestions: string[] expected"}if(null!=t.suggestionsV2&&t.hasOwnProperty("suggestionsV2")){if(!Array.isArray(t.suggestionsV2))return"suggestionsV2: array expected";for(e=0;e<t.suggestionsV2.length;++e){var s=r.SuggestionDescriptor.verify(t.suggestionsV2[e]);if(s)return"suggestionsV2."+s}}return null},s.fromObject=function(t){if(t instanceof r.TrackChangesConnectResponse)return t;var e=new r.TrackChangesConnectResponse;if(null!=t.channel&&(e.channel=String(t.channel)),t.suggestions){if(!Array.isArray(t.suggestions))throw TypeError(".TrackChangesConnectResponse.suggestions: array expected");e.suggestions=[];for(var n=0;n<t.suggestions.length;++n)e.suggestions[n]=String(t.suggestions[n])}if(t.suggestionsV2){if(!Array.isArray(t.suggestionsV2))throw TypeError(".TrackChangesConnectResponse.suggestionsV2: array expected");for(e.suggestionsV2=[],n=0;n<t.suggestionsV2.length;++n){if("object"!=typeof t.suggestionsV2[n])throw TypeError(".TrackChangesConnectResponse.suggestionsV2: object expected");e.suggestionsV2[n]=r.SuggestionDescriptor.fromObject(t.suggestionsV2[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.suggestions=[],n.suggestionsV2=[]),e.defaults&&(n.channel=""),null!=t.channel&&t.hasOwnProperty("channel")&&(n.channel=t.channel),t.suggestions&&t.suggestions.length){n.suggestions=[];for(var s=0;s<t.suggestions.length;++s)n.suggestions[s]=t.suggestions[s]}if(t.suggestionsV2&&t.suggestionsV2.length)for(n.suggestionsV2=[],s=0;s<t.suggestionsV2.length;++s)n.suggestionsV2[s]=r.SuggestionDescriptor.toObject(t.suggestionsV2[s],e);return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/TrackChangesConnectResponse"},s}(),r.TrackChangesGetAllSuggestionsResponse=function(){function s(t){if(this.suggestions=[],this.suggestionsV2=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.suggestions=n.emptyArray,s.prototype.suggestionsV2=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.suggestions&&t.suggestions.length)for(var s=0;s<t.suggestions.length;++s)n.uint32(10).string(t.suggestions[s]);if(null!=t.suggestionsV2&&t.suggestionsV2.length)for(s=0;s<t.suggestionsV2.length;++s)r.SuggestionDescriptor.encode(t.suggestionsV2[s],n.uint32(18).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.TrackChangesGetAllSuggestionsResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.suggestions&&i.suggestions.length||(i.suggestions=[]),i.suggestions.push(e.string());break;case 2:i.suggestionsV2&&i.suggestionsV2.length||(i.suggestionsV2=[]),i.suggestionsV2.push(r.SuggestionDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.suggestions&&t.hasOwnProperty("suggestions")){if(!Array.isArray(t.suggestions))return"suggestions: array expected";for(var e=0;e<t.suggestions.length;++e)if(!n.isString(t.suggestions[e]))return"suggestions: string[] expected"}if(null!=t.suggestionsV2&&t.hasOwnProperty("suggestionsV2")){if(!Array.isArray(t.suggestionsV2))return"suggestionsV2: array expected";for(e=0;e<t.suggestionsV2.length;++e){var s=r.SuggestionDescriptor.verify(t.suggestionsV2[e]);if(s)return"suggestionsV2."+s}}return null},s.fromObject=function(t){if(t instanceof r.TrackChangesGetAllSuggestionsResponse)return t;var e=new r.TrackChangesGetAllSuggestionsResponse;if(t.suggestions){if(!Array.isArray(t.suggestions))throw TypeError(".TrackChangesGetAllSuggestionsResponse.suggestions: array expected");e.suggestions=[];for(var n=0;n<t.suggestions.length;++n)e.suggestions[n]=String(t.suggestions[n])}if(t.suggestionsV2){if(!Array.isArray(t.suggestionsV2))throw TypeError(".TrackChangesGetAllSuggestionsResponse.suggestionsV2: array expected");for(e.suggestionsV2=[],n=0;n<t.suggestionsV2.length;++n){if("object"!=typeof t.suggestionsV2[n])throw TypeError(".TrackChangesGetAllSuggestionsResponse.suggestionsV2: object expected");e.suggestionsV2[n]=r.SuggestionDescriptor.fromObject(t.suggestionsV2[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.suggestions=[],n.suggestionsV2=[]),t.suggestions&&t.suggestions.length){n.suggestions=[];for(var s=0;s<t.suggestions.length;++s)n.suggestions[s]=t.suggestions[s]}if(t.suggestionsV2&&t.suggestionsV2.length)for(n.suggestionsV2=[],s=0;s<t.suggestionsV2.length;++s)n.suggestionsV2[s]=r.SuggestionDescriptor.toObject(t.suggestionsV2[s],e);return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/TrackChangesGetAllSuggestionsResponse"},s}(),r.TrackChangesGetSuggestionResponse=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.authorId="",s.prototype.type="",s.prototype.createdAt="",s.prototype.data="",s.prototype.hasComments=!1,s.prototype.state="",s.prototype.attributes="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.authorId&&Object.hasOwnProperty.call(t,"authorId")&&n.uint32(18).string(t.authorId),null!=t.type&&Object.hasOwnProperty.call(t,"type")&&n.uint32(26).string(t.type),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(34).string(t.createdAt),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(42).string(t.data),null!=t.hasComments&&Object.hasOwnProperty.call(t,"hasComments")&&n.uint32(48).bool(t.hasComments),null!=t.state&&Object.hasOwnProperty.call(t,"state")&&n.uint32(58).string(t.state),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(66).string(t.attributes),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.TrackChangesGetSuggestionResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.authorId=e.string();break;case 3:i.type=e.string();break;case 4:i.createdAt=e.string();break;case 5:i.data=e.string();break;case 6:i.hasComments=e.bool();break;case 7:i.state=e.string();break;case 8:i.attributes=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id)?"id: string expected":null!=t.authorId&&t.hasOwnProperty("authorId")&&!n.isString(t.authorId)?"authorId: string expected":null!=t.type&&t.hasOwnProperty("type")&&!n.isString(t.type)?"type: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isString(t.data)?"data: string expected":null!=t.hasComments&&t.hasOwnProperty("hasComments")&&"boolean"!=typeof t.hasComments?"hasComments: boolean expected":null!=t.state&&t.hasOwnProperty("state")&&!n.isString(t.state)?"state: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null},s.fromObject=function(t){if(t instanceof r.TrackChangesGetSuggestionResponse)return t;var e=new r.TrackChangesGetSuggestionResponse;return null!=t.id&&(e.id=String(t.id)),null!=t.authorId&&(e.authorId=String(t.authorId)),null!=t.type&&(e.type=String(t.type)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),null!=t.data&&(e.data=String(t.data)),null!=t.hasComments&&(e.hasComments=Boolean(t.hasComments)),null!=t.state&&(e.state=String(t.state)),null!=t.attributes&&(e.attributes=String(t.attributes)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.id="",n.authorId="",n.type="",n.createdAt="",n.data="",n.hasComments=!1,n.state="",n.attributes=""),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),null!=t.authorId&&t.hasOwnProperty("authorId")&&(n.authorId=t.authorId),null!=t.type&&t.hasOwnProperty("type")&&(n.type=t.type),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.hasComments&&t.hasOwnProperty("hasComments")&&(n.hasComments=t.hasComments),null!=t.state&&t.hasOwnProperty("state")&&(n.state=t.state),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/TrackChangesGetSuggestionResponse"},s}(),r.UserDescriptor=function(){function s(t){if(this.attributes=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.attributes=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.attributes&&t.attributes.length)for(var s=0;s<t.attributes.length;++s)r.KeyValueDescriptor.encode(t.attributes[s],n.uint32(10).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.UserDescriptor;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?(i.attributes&&i.attributes.length||(i.attributes=[]),i.attributes.push(r.KeyValueDescriptor.decode(e,e.uint32()))):e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.attributes&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var e=0;e<t.attributes.length;++e){var n=r.KeyValueDescriptor.verify(t.attributes[e]);if(n)return"attributes."+n}}return null},s.fromObject=function(t){if(t instanceof r.UserDescriptor)return t;var e=new r.UserDescriptor;if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".UserDescriptor.attributes: array expected");e.attributes=[];for(var n=0;n<t.attributes.length;++n){if("object"!=typeof t.attributes[n])throw TypeError(".UserDescriptor.attributes: object expected");e.attributes[n]=r.KeyValueDescriptor.fromObject(t.attributes[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.attributes=[]),t.attributes&&t.attributes.length){n.attributes=[];for(var s=0;s<t.attributes.length;++s)n.attributes[s]=r.KeyValueDescriptor.toObject(t.attributes[s],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/UserDescriptor"},s}(),r.GetManyUsersMessage=function(){function s(t){if(this.ids=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.ids=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.ids&&t.ids.length)for(var r=0;r<t.ids.length;++r)n.uint32(10).string(t.ids[r]);return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.GetManyUsersMessage;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?(i.ids&&i.ids.length||(i.ids=[]),i.ids.push(e.string())):e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.ids&&t.hasOwnProperty("ids")){if(!Array.isArray(t.ids))return"ids: array expected";for(var e=0;e<t.ids.length;++e)if(!n.isString(t.ids[e]))return"ids: string[] expected"}return null},s.fromObject=function(t){if(t instanceof r.GetManyUsersMessage)return t;var e=new r.GetManyUsersMessage;if(t.ids){if(!Array.isArray(t.ids))throw TypeError(".GetManyUsersMessage.ids: array expected");e.ids=[];for(var n=0;n<t.ids.length;++n)e.ids[n]=String(t.ids[n])}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.ids=[]),t.ids&&t.ids.length){n.ids=[];for(var r=0;r<t.ids.length;++r)n.ids[r]=t.ids[r]}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/GetManyUsersMessage"},s}(),r.GetUserMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.GetUserMessage;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?i.id=e.string():e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id)?"id: string expected":null},s.fromObject=function(t){if(t instanceof r.GetUserMessage)return t;var e=new r.GetUserMessage;return null!=t.id&&(e.id=String(t.id)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.id=""),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/GetUserMessage"},s}(),r.GetManyUsersResponse=function(){function s(t){if(this.users=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.users=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.users&&t.users.length)for(var s=0;s<t.users.length;++s)r.UserDescriptor.encode(t.users[s],n.uint32(10).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.GetManyUsersResponse;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?(i.users&&i.users.length||(i.users=[]),i.users.push(r.UserDescriptor.decode(e,e.uint32()))):e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.users&&t.hasOwnProperty("users")){if(!Array.isArray(t.users))return"users: array expected";for(var e=0;e<t.users.length;++e){var n=r.UserDescriptor.verify(t.users[e]);if(n)return"users."+n}}return null},s.fromObject=function(t){if(t instanceof r.GetManyUsersResponse)return t;var e=new r.GetManyUsersResponse;if(t.users){if(!Array.isArray(t.users))throw TypeError(".GetManyUsersResponse.users: array expected");e.users=[];for(var n=0;n<t.users.length;++n){if("object"!=typeof t.users[n])throw TypeError(".GetManyUsersResponse.users: object expected");e.users[n]=r.UserDescriptor.fromObject(t.users[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.users=[]),t.users&&t.users.length){n.users=[];for(var s=0;s<t.users.length;++s)n.users[s]=r.UserDescriptor.toObject(t.users[s],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/GetManyUsersResponse"},s}(),r.GetUserResponse=function(){function s(t){if(this.attributes=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.attributes=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.attributes&&t.attributes.length)for(var s=0;s<t.attributes.length;++s)r.KeyValueDescriptor.encode(t.attributes[s],n.uint32(10).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.GetUserResponse;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?(i.attributes&&i.attributes.length||(i.attributes=[]),i.attributes.push(r.KeyValueDescriptor.decode(e,e.uint32()))):e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.attributes&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var e=0;e<t.attributes.length;++e){var n=r.KeyValueDescriptor.verify(t.attributes[e]);if(n)return"attributes."+n}}return null},s.fromObject=function(t){if(t instanceof r.GetUserResponse)return t;var e=new r.GetUserResponse;if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".GetUserResponse.attributes: array expected");e.attributes=[];for(var n=0;n<t.attributes.length;++n){if("object"!=typeof t.attributes[n])throw TypeError(".GetUserResponse.attributes: object expected");e.attributes[n]=r.KeyValueDescriptor.fromObject(t.attributes[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.attributes=[]),t.attributes&&t.attributes.length){n.attributes=[];for(var s=0;s<t.attributes.length;++s)n.attributes[s]=r.KeyValueDescriptor.toObject(t.attributes[s],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/GetUserResponse"},s}(),r.ChannelMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.type=0,s.prototype.socketId="",s.prototype.data=n.newBuffer([]),s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.type&&Object.hasOwnProperty.call(t,"type")&&n.uint32(8).uint32(t.type),null!=t.socketId&&Object.hasOwnProperty.call(t,"socketId")&&n.uint32(18).string(t.socketId),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(26).bytes(t.data),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.ChannelMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.type=e.uint32();break;case 2:i.socketId=e.string();break;case 3:i.data=e.bytes();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.type&&t.hasOwnProperty("type")&&!n.isInteger(t.type)?"type: integer expected":null!=t.socketId&&t.hasOwnProperty("socketId")&&!n.isString(t.socketId)?"socketId: string expected":null!=t.data&&t.hasOwnProperty("data")&&!(t.data&&"number"==typeof t.data.length||n.isString(t.data))?"data: buffer expected":null},s.fromObject=function(t){if(t instanceof r.ChannelMessage)return t;var e=new r.ChannelMessage;return null!=t.type&&(e.type=t.type>>>0),null!=t.socketId&&(e.socketId=String(t.socketId)),null!=t.data&&("string"==typeof t.data?n.base64.decode(t.data,e.data=n.newBuffer(n.base64.length(t.data)),0):t.data.length>=0&&(e.data=t.data)),e},s.toObject=function(t,e){e||(e={});var r={};return e.defaults&&(r.type=0,r.socketId="",e.bytes===String?r.data="":(r.data=[],e.bytes!==Array&&(r.data=n.newBuffer(r.data)))),null!=t.type&&t.hasOwnProperty("type")&&(r.type=t.type),null!=t.socketId&&t.hasOwnProperty("socketId")&&(r.socketId=t.socketId),null!=t.data&&t.hasOwnProperty("data")&&(r.data=e.bytes===String?n.base64.encode(t.data,0,t.data.length):e.bytes===Array?Array.prototype.slice.call(t.data):t.data),r},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/ChannelMessage"},s}(),r.BytesBytesPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data=n.newBuffer([]),s.prototype.data1=n.newBuffer([]),s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(10).bytes(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(18).bytes(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.BytesBytesPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.bytes();break;case 2:i.data1=e.bytes();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!(t.data&&"number"==typeof t.data.length||n.isString(t.data))?"data: buffer expected":null!=t.data1&&t.hasOwnProperty("data1")&&!(t.data1&&"number"==typeof t.data1.length||n.isString(t.data1))?"data1: buffer expected":null},s.fromObject=function(t){if(t instanceof r.BytesBytesPacketDataMessage)return t;var e=new r.BytesBytesPacketDataMessage;return null!=t.data&&("string"==typeof t.data?n.base64.decode(t.data,e.data=n.newBuffer(n.base64.length(t.data)),0):t.data.length>=0&&(e.data=t.data)),null!=t.data1&&("string"==typeof t.data1?n.base64.decode(t.data1,e.data1=n.newBuffer(n.base64.length(t.data1)),0):t.data1.length>=0&&(e.data1=t.data1)),e},s.toObject=function(t,e){e||(e={});var r={};return e.defaults&&(e.bytes===String?r.data="":(r.data=[],e.bytes!==Array&&(r.data=n.newBuffer(r.data))),e.bytes===String?r.data1="":(r.data1=[],e.bytes!==Array&&(r.data1=n.newBuffer(r.data1)))),null!=t.data&&t.hasOwnProperty("data")&&(r.data=e.bytes===String?n.base64.encode(t.data,0,t.data.length):e.bytes===Array?Array.prototype.slice.call(t.data):t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(r.data1=e.bytes===String?n.base64.encode(t.data1,0,t.data1.length):e.bytes===Array?Array.prototype.slice.call(t.data1):t.data1),r},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/BytesBytesPacketDataMessage"},s}(),r.NumberBytesPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data=0,s.prototype.data1=n.newBuffer([]),s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(8).uint32(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(18).bytes(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.NumberBytesPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.uint32();break;case 2:i.data1=e.bytes();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isInteger(t.data)?"data: integer expected":null!=t.data1&&t.hasOwnProperty("data1")&&!(t.data1&&"number"==typeof t.data1.length||n.isString(t.data1))?"data1: buffer expected":null},s.fromObject=function(t){if(t instanceof r.NumberBytesPacketDataMessage)return t;var e=new r.NumberBytesPacketDataMessage;return null!=t.data&&(e.data=t.data>>>0),null!=t.data1&&("string"==typeof t.data1?n.base64.decode(t.data1,e.data1=n.newBuffer(n.base64.length(t.data1)),0):t.data1.length>=0&&(e.data1=t.data1)),e},s.toObject=function(t,e){e||(e={});var r={};return e.defaults&&(r.data=0,e.bytes===String?r.data1="":(r.data1=[],e.bytes!==Array&&(r.data1=n.newBuffer(r.data1)))),null!=t.data&&t.hasOwnProperty("data")&&(r.data=t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(r.data1=e.bytes===String?n.base64.encode(t.data1,0,t.data1.length):e.bytes===Array?Array.prototype.slice.call(t.data1):t.data1),r},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/NumberBytesPacketDataMessage"},s}(),r.NumberNumberPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data=0,s.prototype.data1=0,s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(8).uint32(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(16).uint32(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.NumberNumberPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.uint32();break;case 2:i.data1=e.uint32();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isInteger(t.data)?"data: integer expected":null!=t.data1&&t.hasOwnProperty("data1")&&!n.isInteger(t.data1)?"data1: integer expected":null},s.fromObject=function(t){if(t instanceof r.NumberNumberPacketDataMessage)return t;var e=new r.NumberNumberPacketDataMessage;return null!=t.data&&(e.data=t.data>>>0),null!=t.data1&&(e.data1=t.data1>>>0),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.data=0,n.data1=0),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(n.data1=t.data1),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/NumberNumberPacketDataMessage"},s}(),r.NumberObjectPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data=0,s.prototype.data1="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(8).uint32(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(18).string(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.NumberObjectPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.uint32();break;case 2:i.data1=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isInteger(t.data)?"data: integer expected":null!=t.data1&&t.hasOwnProperty("data1")&&!n.isString(t.data1)?"data1: string expected":null},s.fromObject=function(t){if(t instanceof r.NumberObjectPacketDataMessage)return t;var e=new r.NumberObjectPacketDataMessage;return null!=t.data&&(e.data=t.data>>>0),null!=t.data1&&(e.data1=String(t.data1)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.data=0,n.data1=""),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(n.data1=t.data1),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/NumberObjectPacketDataMessage"},s}(),r.NumberStringPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data=0,s.prototype.data1="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(8).uint32(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(18).string(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.NumberStringPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.uint32();break;case 2:i.data1=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isInteger(t.data)?"data: integer expected":null!=t.data1&&t.hasOwnProperty("data1")&&!n.isString(t.data1)?"data1: string expected":null},s.fromObject=function(t){if(t instanceof r.NumberStringPacketDataMessage)return t;var e=new r.NumberStringPacketDataMessage;return null!=t.data&&(e.data=t.data>>>0),null!=t.data1&&(e.data1=String(t.data1)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.data=0,n.data1=""),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(n.data1=t.data1),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/NumberStringPacketDataMessage"},s}(),r.ObjectBufferPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data="",s.prototype.data1=n.newBuffer([]),s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(10).string(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(18).bytes(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.ObjectBufferPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.string();break;case 2:i.data1=e.bytes();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isString(t.data)?"data: string expected":null!=t.data1&&t.hasOwnProperty("data1")&&!(t.data1&&"number"==typeof t.data1.length||n.isString(t.data1))?"data1: buffer expected":null},s.fromObject=function(t){if(t instanceof r.ObjectBufferPacketDataMessage)return t;var e=new r.ObjectBufferPacketDataMessage;return null!=t.data&&(e.data=String(t.data)),null!=t.data1&&("string"==typeof t.data1?n.base64.decode(t.data1,e.data1=n.newBuffer(n.base64.length(t.data1)),0):t.data1.length>=0&&(e.data1=t.data1)),e},s.toObject=function(t,e){e||(e={});var r={};return e.defaults&&(r.data="",e.bytes===String?r.data1="":(r.data1=[],e.bytes!==Array&&(r.data1=n.newBuffer(r.data1)))),null!=t.data&&t.hasOwnProperty("data")&&(r.data=t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(r.data1=e.bytes===String?n.base64.encode(t.data1,0,t.data1.length):e.bytes===Array?Array.prototype.slice.call(t.data1):t.data1),r},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/ObjectBufferPacketDataMessage"},s}(),r.ObjectObjectPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data="",s.prototype.data1="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(10).string(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(18).string(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.ObjectObjectPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.string();break;case 2:i.data1=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isString(t.data)?"data: string expected":null!=t.data1&&t.hasOwnProperty("data1")&&!n.isString(t.data1)?"data1: string expected":null},s.fromObject=function(t){if(t instanceof r.ObjectObjectPacketDataMessage)return t;var e=new r.ObjectObjectPacketDataMessage;return null!=t.data&&(e.data=String(t.data)),null!=t.data1&&(e.data1=String(t.data1)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.data="",n.data1=""),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(n.data1=t.data1),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/ObjectObjectPacketDataMessage"},s}(),r.PacketMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.type=0,s.prototype.id=0,s.prototype.nsp="",s.prototype.data=n.newBuffer([]),s.prototype.options=n.newBuffer([]),s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.type&&Object.hasOwnProperty.call(t,"type")&&n.uint32(8).uint32(t.type),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(16).uint32(t.id),null!=t.nsp&&Object.hasOwnProperty.call(t,"nsp")&&n.uint32(26).string(t.nsp),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(34).bytes(t.data),null!=t.options&&Object.hasOwnProperty.call(t,"options")&&n.uint32(42).bytes(t.options),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.PacketMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.type=e.uint32();break;case 2:i.id=e.uint32();break;case 3:i.nsp=e.string();break;case 4:i.data=e.bytes();break;case 5:i.options=e.bytes();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.type&&t.hasOwnProperty("type")&&!n.isInteger(t.type)?"type: integer expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isInteger(t.id)?"id: integer expected":null!=t.nsp&&t.hasOwnProperty("nsp")&&!n.isString(t.nsp)?"nsp: string expected":null!=t.data&&t.hasOwnProperty("data")&&!(t.data&&"number"==typeof t.data.length||n.isString(t.data))?"data: buffer expected":null!=t.options&&t.hasOwnProperty("options")&&!(t.options&&"number"==typeof t.options.length||n.isString(t.options))?"options: buffer expected":null},s.fromObject=function(t){if(t instanceof r.PacketMessage)return t;var e=new r.PacketMessage;return null!=t.type&&(e.type=t.type>>>0),null!=t.id&&(e.id=t.id>>>0),null!=t.nsp&&(e.nsp=String(t.nsp)),null!=t.data&&("string"==typeof t.data?n.base64.decode(t.data,e.data=n.newBuffer(n.base64.length(t.data)),0):t.data.length>=0&&(e.data=t.data)),null!=t.options&&("string"==typeof t.options?n.base64.decode(t.options,e.options=n.newBuffer(n.base64.length(t.options)),0):t.options.length>=0&&(e.options=t.options)),e},s.toObject=function(t,e){e||(e={});var r={};return e.defaults&&(r.type=0,r.id=0,r.nsp="",e.bytes===String?r.data="":(r.data=[],e.bytes!==Array&&(r.data=n.newBuffer(r.data))),e.bytes===String?r.options="":(r.options=[],e.bytes!==Array&&(r.options=n.newBuffer(r.options)))),null!=t.type&&t.hasOwnProperty("type")&&(r.type=t.type),null!=t.id&&t.hasOwnProperty("id")&&(r.id=t.id),null!=t.nsp&&t.hasOwnProperty("nsp")&&(r.nsp=t.nsp),null!=t.data&&t.hasOwnProperty("data")&&(r.data=e.bytes===String?n.base64.encode(t.data,0,t.data.length):e.bytes===Array?Array.prototype.slice.call(t.data):t.data),null!=t.options&&t.hasOwnProperty("options")&&(r.options=e.bytes===String?n.base64.encode(t.options,0,t.options.length):e.bytes===Array?Array.prototype.slice.call(t.options):t.options),r},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/PacketMessage"},s}(),r.PacketOptionsMessage=function(){function s(t){if(this.rooms=[],this.except=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.flags="",s.prototype.rooms=n.emptyArray,s.prototype.except=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.flags&&Object.hasOwnProperty.call(t,"flags")&&n.uint32(10).string(t.flags),null!=t.rooms&&t.rooms.length)for(var r=0;r<t.rooms.length;++r)n.uint32(18).string(t.rooms[r]);if(null!=t.except&&t.except.length)for(r=0;r<t.except.length;++r)n.uint32(26).string(t.except[r]);return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.PacketOptionsMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.flags=e.string();break;case 2:i.rooms&&i.rooms.length||(i.rooms=[]),i.rooms.push(e.string());break;case 3:i.except&&i.except.length||(i.except=[]),i.except.push(e.string());break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.flags&&t.hasOwnProperty("flags")&&!n.isString(t.flags))return"flags: string expected";if(null!=t.rooms&&t.hasOwnProperty("rooms")){if(!Array.isArray(t.rooms))return"rooms: array expected";for(var e=0;e<t.rooms.length;++e)if(!n.isString(t.rooms[e]))return"rooms: string[] expected"}if(null!=t.except&&t.hasOwnProperty("except")){if(!Array.isArray(t.except))return"except: array expected";for(e=0;e<t.except.length;++e)if(!n.isString(t.except[e]))return"except: string[] expected"}return null},s.fromObject=function(t){if(t instanceof r.PacketOptionsMessage)return t;var e=new r.PacketOptionsMessage;if(null!=t.flags&&(e.flags=String(t.flags)),t.rooms){if(!Array.isArray(t.rooms))throw TypeError(".PacketOptionsMessage.rooms: array expected");e.rooms=[];for(var n=0;n<t.rooms.length;++n)e.rooms[n]=String(t.rooms[n])}if(t.except){if(!Array.isArray(t.except))throw TypeError(".PacketOptionsMessage.except: array expected");for(e.except=[],n=0;n<t.except.length;++n)e.except[n]=String(t.except[n])}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.rooms=[],n.except=[]),e.defaults&&(n.flags=""),null!=t.flags&&t.hasOwnProperty("flags")&&(n.flags=t.flags),t.rooms&&t.rooms.length){n.rooms=[];for(var r=0;r<t.rooms.length;++r)n.rooms[r]=t.rooms[r]}if(t.except&&t.except.length)for(n.except=[],r=0;r<t.except.length;++r)n.except[r]=t.except[r];return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/PacketOptionsMessage"},s}(),r.StringBytesPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data="",s.prototype.data1=n.newBuffer([]),s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(10).string(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(18).bytes(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.StringBytesPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.string();break;case 2:i.data1=e.bytes();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isString(t.data)?"data: string expected":null!=t.data1&&t.hasOwnProperty("data1")&&!(t.data1&&"number"==typeof t.data1.length||n.isString(t.data1))?"data1: buffer expected":null},s.fromObject=function(t){if(t instanceof r.StringBytesPacketDataMessage)return t;var e=new r.StringBytesPacketDataMessage;return null!=t.data&&(e.data=String(t.data)),null!=t.data1&&("string"==typeof t.data1?n.base64.decode(t.data1,e.data1=n.newBuffer(n.base64.length(t.data1)),0):t.data1.length>=0&&(e.data1=t.data1)),e},s.toObject=function(t,e){e||(e={});var r={};return e.defaults&&(r.data="",e.bytes===String?r.data1="":(r.data1=[],e.bytes!==Array&&(r.data1=n.newBuffer(r.data1)))),null!=t.data&&t.hasOwnProperty("data")&&(r.data=t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(r.data1=e.bytes===String?n.base64.encode(t.data1,0,t.data1.length):e.bytes===Array?Array.prototype.slice.call(t.data1):t.data1),r},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/StringBytesPacketDataMessage"},s}(),r.StringNumberPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data="",s.prototype.data1=0,s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(10).string(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(16).uint32(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.StringNumberPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.string();break;case 2:i.data1=e.uint32();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isString(t.data)?"data: string expected":null!=t.data1&&t.hasOwnProperty("data1")&&!n.isInteger(t.data1)?"data1: integer expected":null},s.fromObject=function(t){if(t instanceof r.StringNumberPacketDataMessage)return t;var e=new r.StringNumberPacketDataMessage;return null!=t.data&&(e.data=String(t.data)),null!=t.data1&&(e.data1=t.data1>>>0),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.data="",n.data1=0),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(n.data1=t.data1),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/StringNumberPacketDataMessage"},s}(),r.StringObjectPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data="",s.prototype.data1="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(10).string(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(18).string(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.StringObjectPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.string();break;case 2:i.data1=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isString(t.data)?"data: string expected":null!=t.data1&&t.hasOwnProperty("data1")&&!n.isString(t.data1)?"data1: string expected":null},s.fromObject=function(t){if(t instanceof r.StringObjectPacketDataMessage)return t;var e=new r.StringObjectPacketDataMessage;return null!=t.data&&(e.data=String(t.data)),null!=t.data1&&(e.data1=String(t.data1)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.data="",n.data1=""),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(n.data1=t.data1),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/StringObjectPacketDataMessage"},s}(),r.StringStringPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data="",s.prototype.data1="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(10).string(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(18).string(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.StringStringPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.string();break;case 2:i.data1=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isString(t.data)?"data: string expected":null!=t.data1&&t.hasOwnProperty("data1")&&!n.isString(t.data1)?"data1: string expected":null},s.fromObject=function(t){if(t instanceof r.StringStringPacketDataMessage)return t;var e=new r.StringStringPacketDataMessage;return null!=t.data&&(e.data=String(t.data)),null!=t.data1&&(e.data1=String(t.data1)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.data="",n.data1=""),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(n.data1=t.data1),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/StringStringPacketDataMessage"},s}(),r})();class l{static decode(t,e){const n=p(e).decode("undefined"==typeof window?t:new Uint8Array(t));return e.fromJSON({...n})}static encode(t){const e=p(t.constructor),n=t.toJSON(),r=e.verify(n);if(r)throw Error(r);return e.encode(e.create(n)).finish()}}function p(t){return d[t.DESCRIPTOR_NAME]}class h extends i{ids;static TYPE="22";static READABLE_TYPE_NAME="getManyUsers";static DESCRIPTOR_NAME="GetManyUsersMessage";static DESCRIPTOR={fields:{ids:{id:1,type:"string",rule:"repeated"}}};constructor(t){super(),this.ids=t}toJSON(){return{ids:this.ids}}static fromJSON(t){return new h(t.ids)}}class f extends i{users;static DESCRIPTOR_NAME="GetManyUsersResponse";static DESCRIPTOR={fields:{users:{rule:"repeated",type:"UserDescriptor",id:1}}};constructor(t){super(),this.users=t}toJSON(){return{users:this.users.map(m)}}static fromJSON(t){return new f(t.users.map(y))}}function m(t){return{attributes:Object.keys(t).map(e=>({key:e,value:JSON.stringify(t[e])}))}}function y(t){return t.attributes.reduce((t,e)=>(t[e.key]=e.value?JSON.parse(e.value):null,t),{})}class g{static _SERVICE=2;constructor(t={}){this._attributes=new Map;for(const e of Object.keys(t))"id"!==e?(this._attributes.set(e,t[e]),Object.defineProperty(this,e,{enumerable:!0,configurable:!1,get:()=>this._attributes.get(e)})):this.id=t.id}static fromData(t){return new g(t)}static async get(t,e){const n=new a(e);try{const e=await t._sendRequest(g._SERVICE,a.TYPE,l.encode(n)),r=l.decode(e,c);return new g(r.attributes)}catch(t){return new g({id:e})}}static async getMany(t,e){const n=new h(e);try{const e=await t._sendRequest(g._SERVICE,h.TYPE,l.encode(n));return l.decode(e,f).users.map(t=>new g(t))}catch(t){return e.map(t=>new g({id:t}))}}}const b=g,I=Object.create(null);I.open="0",I.close="1",I.ping="2",I.pong="3",I.message="4",I.upgrade="5",I.noop="6";const O=Object.create(null);Object.keys(I).forEach(t=>{O[I[t]]=t});const v={type:"error",data:"parser error"},w="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),S="function"==typeof ArrayBuffer,k=t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,A=({type:t,data:e},n,r)=>w&&e instanceof Blob?n?r(e):T(e,r):S&&(e instanceof ArrayBuffer||k(e))?n?r(e):T(new Blob([e]),r):r(I[t]+(e||"")),T=(t,e)=>{const n=new FileReader;return n.onload=function(){const t=n.result.split(",")[1];e("b"+(t||""))},n.readAsDataURL(t)};function _(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let C;const P="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",E="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let t=0;t<64;t++)E[P.charCodeAt(t)]=t;const j="function"==typeof ArrayBuffer,D=(t,e)=>{if("string"!=typeof t)return{type:"message",data:R(t,e)};const n=t.charAt(0);if("b"===n)return{type:"message",data:x(t.substring(1),e)};return O[n]?t.length>1?{type:O[n],data:t.substring(1)}:{type:O[n]}:v},x=(t,e)=>{if(j){const n=(t=>{let e,n,r,s,o,i=.75*t.length,a=t.length,c=0;"="===t[t.length-1]&&(i--,"="===t[t.length-2]&&i--);const u=new ArrayBuffer(i),d=new Uint8Array(u);for(e=0;e<a;e+=4)n=E[t.charCodeAt(e)],r=E[t.charCodeAt(e+1)],s=E[t.charCodeAt(e+2)],o=E[t.charCodeAt(e+3)],d[c++]=n<<2|r>>4,d[c++]=(15&r)<<4|s>>2,d[c++]=(3&s)<<6|63&o;return u})(t);return R(n,e)}return{base64:!0,data:t}},R=(t,e)=>"blob"===e?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer,N=String.fromCharCode(30);function V(){return new TransformStream({transform(t,e){!function(t,e){w&&t.data instanceof Blob?t.data.arrayBuffer().then(_).then(e):S&&(t.data instanceof ArrayBuffer||k(t.data))?e(_(t.data)):A(t,!1,t=>{C||(C=new TextEncoder),e(C.encode(t))})}(t,n=>{const r=n.length;let s;if(r<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,r);else if(r<65536){s=new Uint8Array(3);const t=new DataView(s.buffer);t.setUint8(0,126),t.setUint16(1,r)}else{s=new Uint8Array(9);const t=new DataView(s.buffer);t.setUint8(0,127),t.setBigUint64(1,BigInt(r))}t.data&&"string"!=typeof t.data&&(s[0]|=128),e.enqueue(s),e.enqueue(n)})}})}let M;function B(t){return t.reduce((t,e)=>t+e.length,0)}function J(t,e){if(t[0].length===e)return t.shift();const n=new Uint8Array(e);let r=0;for(let s=0;s<e;s++)n[s]=t[0][r++],r===t[0].length&&(t.shift(),r=0);return t.length&&r<t[0].length&&(t[0]=t[0].slice(r)),n}function U(t){if(t)return function(t){for(var e in U.prototype)t[e]=U.prototype[e];return t}(t)}U.prototype.on=U.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},U.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},U.prototype.off=U.prototype.removeListener=U.prototype.removeAllListeners=U.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var s=0;s<r.length;s++)if((n=r[s])===e||n.fn===e){r.splice(s,1);break}return 0===r.length&&delete this._callbacks["$"+t],this},U.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){r=0;for(var s=(n=n.slice(0)).length;r<s;++r)n[r].apply(this,e)}return this},U.prototype.emitReserved=U.prototype.emit,U.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},U.prototype.hasListeners=function(t){return!!this.listeners(t).length};const q="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function L(t,...e){return e.reduce((e,n)=>(t.hasOwnProperty(n)&&(e[n]=t[n]),e),{})}const G=q.setTimeout,Y=q.clearTimeout;function H(t,e){e.useNativeTimers?(t.setTimeoutFn=G.bind(q),t.clearTimeoutFn=Y.bind(q)):(t.setTimeoutFn=q.setTimeout.bind(q),t.clearTimeoutFn=q.clearTimeout.bind(q))}function z(t){return"string"==typeof t?function(t){let e=0,n=0;for(let r=0,s=t.length;r<s;r++)e=t.charCodeAt(r),e<128?n+=1:e<2048?n+=2:e<55296||e>=57344?n+=3:(r++,n+=4);return n}(t):Math.ceil(1.33*(t.byteLength||t.size))}class F extends Error{constructor(t,e,n){super(t),this.description=e,this.context=n,this.type="TransportError"}}class K extends U{constructor(t){super(),this.writable=!1,H(this,t),this.opts=t,this.query=t.query,this.socket=t.socket}onError(t,e,n){return super.emitReserved("error",new F(t,e,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(t){"open"===this.readyState&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const e=D(t,this.socket.binaryType);this.onPacket(e)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,e={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(e)}_hostname(){const t=this.opts.hostname;return-1===t.indexOf(":")?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(t){const e=function(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}(t);return e.length?"?"+e:""}}const W="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),Q={};let Z,X=0,$=0;function tt(t){let e="";do{e=W[t%64]+e,t=Math.floor(t/64)}while(t>0);return e}function et(){const t=tt(+new Date);return t!==Z?(X=0,Z=t):t+"."+tt(X++)}for(;$<64;$++)Q[W[$]]=$;let nt=!1;try{nt="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){}const rt=nt;function st(t){const e=t.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!e||rt))return new XMLHttpRequest}catch(t){}if(!e)try{return new(q[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}function ot(){}const it=null!=new st({xdomain:!1}).responseType;class at extends U{constructor(t,e){super(),H(this,e),this.opts=e,this.method=e.method||"GET",this.uri=t,this.data=void 0!==e.data?e.data:null,this.create()}create(){var t;const e=L(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this.opts.xd;const n=this.xhr=new st(e);try{n.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let t in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(t)&&n.setRequestHeader(t,this.opts.extraHeaders[t])}}catch(t){}if("POST"===this.method)try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{n.setRequestHeader("Accept","*/*")}catch(t){}null===(t=this.opts.cookieJar)||void 0===t||t.addCookies(n),"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{var t;3===n.readyState&&(null===(t=this.opts.cookieJar)||void 0===t||t.parseCookies(n)),4===n.readyState&&(200===n.status||1223===n.status?this.onLoad():this.setTimeoutFn(()=>{this.onError("number"==typeof n.status?n.status:0)},0))},n.send(this.data)}catch(t){return void this.setTimeoutFn(()=>{this.onError(t)},0)}"undefined"!=typeof document&&(this.index=at.requestsCount++,at.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=ot,t)try{this.xhr.abort()}catch(t){}"undefined"!=typeof document&&delete at.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(at.requestsCount=0,at.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",ct);else if("function"==typeof addEventListener){addEventListener("onpagehide"in q?"pagehide":"unload",ct,!1)}function ct(){for(let t in at.requests)at.requests.hasOwnProperty(t)&&at.requests[t].abort()}const ut="function"==typeof Promise&&"function"==typeof Promise.resolve?t=>Promise.resolve().then(t):(t,e)=>e(t,0),dt=q.WebSocket||q.MozWebSocket,lt="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();const pt={websocket:class extends K{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),e=this.opts.protocols,n=lt?{}:L(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=lt?new dt(t,e,n):e?new dt(t,e):new dt(t)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let e=0;e<t.length;e++){const n=t[e],r=e===t.length-1;A(n,this.supportsBinary,t=>{try{this.ws.send(t)}catch(t){}r&&ut(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",e=this.query||{};return this.opts.timestampRequests&&(e[this.opts.timestampParam]=et()),this.supportsBinary||(e.b64=1),this.createUri(t,e)}check(){return!!dt}},webtransport:class extends K{get name(){return"webtransport"}doOpen(){"function"==typeof WebTransport&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(t=>{const e=function(t,e){M||(M=new TextDecoder);const n=[];let r=0,s=-1,o=!1;return new TransformStream({transform(i,a){for(n.push(i);;){if(0===r){if(B(n)<1)break;const t=J(n,1);o=!(128&~t[0]),s=127&t[0],r=s<126?3:126===s?1:2}else if(1===r){if(B(n)<2)break;const t=J(n,2);s=new DataView(t.buffer,t.byteOffset,t.length).getUint16(0),r=3}else if(2===r){if(B(n)<8)break;const t=J(n,8),e=new DataView(t.buffer,t.byteOffset,t.length),o=e.getUint32(0);if(o>Math.pow(2,21)-1){a.enqueue(v);break}s=o*Math.pow(2,32)+e.getUint32(4),r=3}else{if(B(n)<s)break;const t=J(n,s);a.enqueue(D(o?t:M.decode(t),e)),r=0}if(0===s||s>t){a.enqueue(v);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=t.readable.pipeThrough(e).getReader(),r=V();r.readable.pipeTo(t.writable),this.writer=r.writable.getWriter();const s=()=>{n.read().then(({done:t,value:e})=>{t||(this.onPacket(e),s())}).catch(t=>{})};s();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this.writer.write(o).then(()=>this.onOpen())})}))}write(t){this.writable=!1;for(let e=0;e<t.length;e++){const n=t[e],r=e===t.length-1;this.writer.write(n).then(()=>{r&&ut(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;null===(t=this.transport)||void 0===t||t.close()}},polling:class extends K{constructor(t){if(super(t),this.polling=!1,"undefined"!=typeof location){const e="https:"===location.protocol;let n=location.port;n||(n=e?"443":"80"),this.xd="undefined"!=typeof location&&t.hostname!==location.hostname||n!==t.port}const e=t&&t.forceBase64;this.supportsBinary=it&&!e,this.opts.withCredentials&&(this.cookieJar=void 0)}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const e=()=>{this.readyState="paused",t()};if(this.polling||!this.writable){let t=0;this.polling&&(t++,this.once("pollComplete",function(){--t||e()})),this.writable||(t++,this.once("drain",function(){--t||e()}))}else e()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){((t,e)=>{const n=t.split(N),r=[];for(let t=0;t<n.length;t++){const s=D(n[t],e);if(r.push(s),"error"===s.type)break}return r})(t,this.socket.binaryType).forEach(t=>{if("opening"===this.readyState&&"open"===t.type&&this.onOpen(),"close"===t.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(t)}),"closed"!==this.readyState&&(this.polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};"open"===this.readyState?t():this.once("open",t)}write(t){this.writable=!1,((t,e)=>{const n=t.length,r=new Array(n);let s=0;t.forEach((t,o)=>{A(t,!1,t=>{r[o]=t,++s===n&&e(r.join(N))})})})(t,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",e=this.query||{};return!1!==this.opts.timestampRequests&&(e[this.opts.timestampParam]=et()),this.supportsBinary||e.sid||(e.b64=1),this.createUri(t,e)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new at(this.uri(),t)}doWrite(t,e){const n=this.request({method:"POST",data:t});n.on("success",e),n.on("error",(t,e)=>{this.onError("xhr post error",t,e)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(t,e)=>{this.onError("xhr poll error",t,e)}),this.pollXhr=t}}},ht=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,ft=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function mt(t){if(t.length>2e3)throw"URI too long";const e=t,n=t.indexOf("["),r=t.indexOf("]");-1!=n&&-1!=r&&(t=t.substring(0,n)+t.substring(n,r).replace(/:/g,";")+t.substring(r,t.length));let s=ht.exec(t||""),o={},i=14;for(;i--;)o[ft[i]]=s[i]||"";return-1!=n&&-1!=r&&(o.source=e,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=function(t,e){const n=/\/{2,9}/g,r=e.replace(n,"/").split("/");"/"!=e.slice(0,1)&&0!==e.length||r.splice(0,1);"/"==e.slice(-1)&&r.splice(r.length-1,1);return r}(0,o.path),o.queryKey=function(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(t,e,r){e&&(n[e]=r)}),n}(0,o.query),o}class yt extends U{constructor(t,e={}){super(),this.binaryType="arraybuffer",this.writeBuffer=[],t&&"object"==typeof t&&(e=t,t=null),t?(t=mt(t),e.hostname=t.host,e.secure="https"===t.protocol||"wss"===t.protocol,e.port=t.port,t.query&&(e.query=t.query)):e.host&&(e.hostname=mt(e.host).host),H(this,e),this.secure=null!=e.secure?e.secure:"undefined"!=typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=e.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=e.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},e),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(t){let e={},n=t.split("&");for(let t=0,r=n.length;t<r;t++){let r=n[t].split("=");e[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return e}(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,"function"==typeof addEventListener&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const e=Object.assign({},this.opts.query);e.EIO=4,e.transport=t,this.id&&(e.sid=this.id);const n=Object.assign({},this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new pt[t](n)}open(){let t;if(this.opts.rememberUpgrade&&yt.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))t="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(t){return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",t=>this.onClose("transport close",t))}probe(t){let e=this.createTransport(t),n=!1;yt.priorWebsocketSuccess=!1;const r=()=>{n||(e.send([{type:"ping",data:"probe"}]),e.once("packet",t=>{if(!n)if("pong"===t.type&&"probe"===t.data){if(this.upgrading=!0,this.emitReserved("upgrading",e),!e)return;yt.priorWebsocketSuccess="websocket"===e.name,this.transport.pause(()=>{n||"closed"!==this.readyState&&(u(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emitReserved("upgrade",e),e=null,this.upgrading=!1,this.flush())})}else{const t=new Error("probe error");t.transport=e.name,this.emitReserved("upgradeError",t)}}))};function s(){n||(n=!0,u(),e.close(),e=null)}const o=t=>{const n=new Error("probe error: "+t);n.transport=e.name,s(),this.emitReserved("upgradeError",n)};function i(){o("transport closed")}function a(){o("socket closed")}function c(t){e&&t.name!==e.name&&s()}const u=()=>{e.removeListener("open",r),e.removeListener("error",o),e.removeListener("close",i),this.off("close",a),this.off("upgrading",c)};e.once("open",r),e.once("error",o),e.once("close",i),this.once("close",a),this.once("upgrading",c),-1!==this.upgrades.indexOf("webtransport")&&"webtransport"!==t?this.setTimeoutFn(()=>{n||e.open()},200):e.open()}onOpen(){if(this.readyState="open",yt.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade){let t=0;const e=this.upgrades.length;for(;t<e;t++)this.probe(this.upgrades[t])}}onPacket(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),this.resetPingTimeout(),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const e=new Error("server error");e.code=t.data,this.onError(e);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data)}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.maxPayload=t.maxPayload,this.onOpen(),"closed"!==this.readyState&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let e=0;e<this.writeBuffer.length;e++){const n=this.writeBuffer[e].data;if(n&&(t+=z(n)),e>0&&t>this.maxPayload)return this.writeBuffer.slice(0,e);t+=2}return this.writeBuffer}write(t,e,n){return this.sendPacket("message",t,e,n),this}send(t,e,n){return this.sendPacket("message",t,e,n),this}sendPacket(t,e,n,r){if("function"==typeof e&&(r=e,e=void 0),"function"==typeof n&&(r=n,n=null),"closing"===this.readyState||"closed"===this.readyState)return;(n=n||{}).compress=!1!==n.compress;const s={type:t,data:e,options:n};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),r&&this.once("flush",r),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),t()},n=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():t()}):this.upgrading?n():t()),this}onError(t){yt.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,e){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const e=[];let n=0;const r=t.length;for(;n<r;n++)~this.transports.indexOf(t[n])&&e.push(t[n]);return e}}yt.protocol=4;yt.protocol;const gt="function"==typeof ArrayBuffer,bt=Object.prototype.toString,It="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===bt.call(Blob),Ot="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===bt.call(File);function vt(t){return gt&&(t instanceof ArrayBuffer||(t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(t))||It&&t instanceof Blob||Ot&&t instanceof File}function wt(t,e){if(!t||"object"!=typeof t)return!1;if(Array.isArray(t)){for(let e=0,n=t.length;e<n;e++)if(wt(t[e]))return!0;return!1}if(vt(t))return!0;if(t.toJSON&&"function"==typeof t.toJSON&&1===arguments.length)return wt(t.toJSON(),!0);for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&wt(t[e]))return!0;return!1}function St(t){const e=[],n=t.data,r=t;return r.data=kt(n,e),r.attachments=e.length,{packet:r,buffers:e}}function kt(t,e){if(!t)return t;if(vt(t)){const n={_placeholder:!0,num:e.length};return e.push(t),n}if(Array.isArray(t)){const n=new Array(t.length);for(let r=0;r<t.length;r++)n[r]=kt(t[r],e);return n}if("object"==typeof t&&!(t instanceof Date)){const n={};for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=kt(t[r],e));return n}return t}function At(t,e){return t.data=Tt(t.data,e),delete t.attachments,t}function Tt(t,e){if(!t)return t;if(t&&!0===t._placeholder){if("number"==typeof t.num&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}if(Array.isArray(t))for(let n=0;n<t.length;n++)t[n]=Tt(t[n],e);else if("object"==typeof t)for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=Tt(t[n],e));return t}const _t=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Ct=5;var Pt;!function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"}(Pt||(Pt={}));class Et{constructor(t){this.replacer=t}encode(t){return t.type!==Pt.EVENT&&t.type!==Pt.ACK||!wt(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===Pt.EVENT?Pt.BINARY_EVENT:Pt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let e=""+t.type;return t.type!==Pt.BINARY_EVENT&&t.type!==Pt.BINARY_ACK||(e+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(e+=t.nsp+","),null!=t.id&&(e+=t.id),null!=t.data&&(e+=JSON.stringify(t.data,this.replacer)),e}encodeAsBinary(t){const e=St(t),n=this.encodeAsString(e.packet),r=e.buffers;return r.unshift(n),r}}function jt(t){return"[object Object]"===Object.prototype.toString.call(t)}class Dt extends U{constructor(t){super(),this.reviver=t}add(t){let e;if("string"==typeof t){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");e=this.decodeString(t);const n=e.type===Pt.BINARY_EVENT;n||e.type===Pt.BINARY_ACK?(e.type=n?Pt.EVENT:Pt.ACK,this.reconstructor=new xt(e),0===e.attachments&&super.emitReserved("decoded",e)):super.emitReserved("decoded",e)}else{if(!vt(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");e=this.reconstructor.takeBinaryData(t),e&&(this.reconstructor=null,super.emitReserved("decoded",e))}}decodeString(t){let e=0;const n={type:Number(t.charAt(0))};if(void 0===Pt[n.type])throw new Error("unknown packet type "+n.type);if(n.type===Pt.BINARY_EVENT||n.type===Pt.BINARY_ACK){const r=e+1;for(;"-"!==t.charAt(++e)&&e!=t.length;);const s=t.substring(r,e);if(s!=Number(s)||"-"!==t.charAt(e))throw new Error("Illegal attachments");n.attachments=Number(s)}if("/"===t.charAt(e+1)){const r=e+1;for(;++e;){if(","===t.charAt(e))break;if(e===t.length)break}n.nsp=t.substring(r,e)}else n.nsp="/";const r=t.charAt(e+1);if(""!==r&&Number(r)==r){const r=e+1;for(;++e;){const n=t.charAt(e);if(null==n||Number(n)!=n){--e;break}if(e===t.length)break}n.id=Number(t.substring(r,e+1))}if(t.charAt(++e)){const r=this.tryParse(t.substr(e));if(!Dt.isPayloadValid(n.type,r))throw new Error("invalid payload");n.data=r}return n}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(t){return!1}}static isPayloadValid(t,e){switch(t){case Pt.CONNECT:return jt(e);case Pt.DISCONNECT:return void 0===e;case Pt.CONNECT_ERROR:return"string"==typeof e||jt(e);case Pt.EVENT:case Pt.BINARY_EVENT:return Array.isArray(e)&&("number"==typeof e[0]||"string"==typeof e[0]&&-1===_t.indexOf(e[0]));case Pt.ACK:case Pt.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class xt{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const t=At(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function Rt(t,e,n){return t.on(e,n),function(){t.off(e,n)}}const Nt=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Vt extends U{constructor(t,e,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=e,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Rt(t,"open",this.onopen.bind(this)),Rt(t,"packet",this.onpacket.bind(this)),Rt(t,"error",this.onerror.bind(this)),Rt(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...e){if(Nt.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(e.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(e),this;const n={type:Pt.EVENT,data:e,options:{}};if(n.options.compress=!1!==this.flags.compress,"function"==typeof e[e.length-1]){const t=this.ids++,r=e.pop();this._registerAckCallback(t,r),n.id=t}const r=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!r||!this.connected)||(this.connected?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n)),this.flags={},this}_registerAckCallback(t,e){var n;const r=null!==(n=this.flags.timeout)&&void 0!==n?n:this._opts.ackTimeout;if(void 0===r)return void(this.acks[t]=e);const s=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let e=0;e<this.sendBuffer.length;e++)this.sendBuffer[e].id===t&&this.sendBuffer.splice(e,1);e.call(this,new Error("operation has timed out"))},r);this.acks[t]=(...t)=>{this.io.clearTimeoutFn(s),e.apply(this,[null,...t])}}emitWithAck(t,...e){const n=void 0!==this.flags.timeout||void 0!==this._opts.ackTimeout;return new Promise((r,s)=>{e.push((t,e)=>n?t?s(t):r(e):r(t)),this.emit(t,...e)})}_addToQueue(t){let e;"function"==typeof t[t.length-1]&&(e=t.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((t,...r)=>{if(n!==this._queue[0])return;return null!==t?n.tryCount>this._opts.retries&&(this._queue.shift(),e&&e(t)):(this._queue.shift(),e&&e(null,...r)),n.pending=!1,this._drainQueue()}),this._queue.push(n),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||0===this._queue.length)return;const e=this._queue[0];e.pending&&!t||(e.pending=!0,e.tryCount++,this.flags=e.flags,this.emit.apply(this,e.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){"function"==typeof this.auth?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Pt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,e){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,e)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Pt.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Pt.EVENT:case Pt.BINARY_EVENT:this.onevent(t);break;case Pt.ACK:case Pt.BINARY_ACK:this.onack(t);break;case Pt.DISCONNECT:this.ondisconnect();break;case Pt.CONNECT_ERROR:this.destroy();const e=new Error(t.data.message);e.data=t.data.data,this.emitReserved("connect_error",e)}}onevent(t){const e=t.data||[];null!=t.id&&e.push(this.ack(t.id)),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const e=this._anyListeners.slice();for(const n of e)n.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&"string"==typeof t[t.length-1]&&(this._lastOffset=t[t.length-1])}ack(t){const e=this;let n=!1;return function(...r){n||(n=!0,e.packet({type:Pt.ACK,id:t,data:r}))}}onack(t){const e=this.acks[t.id];"function"==typeof e&&(e.apply(this,t.data),delete this.acks[t.id])}onconnect(t,e){this.id=t,this.recovered=e&&this._pid===e,this._pid=e,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Pt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const e=this._anyListeners;for(let n=0;n<e.length;n++)if(t===e[n])return e.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const e=this._anyOutgoingListeners;for(let n=0;n<e.length;n++)if(t===e[n])return e.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const e=this._anyOutgoingListeners.slice();for(const n of e)n.apply(this,t.data)}}}function Mt(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}Mt.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=1&Math.floor(10*e)?t+n:t-n}return 0|Math.min(t,this.max)},Mt.prototype.reset=function(){this.attempts=0},Mt.prototype.setMin=function(t){this.ms=t},Mt.prototype.setMax=function(t){this.max=t},Mt.prototype.setJitter=function(t){this.jitter=t};class Bt extends U{constructor(e,n){var r;super(),this.nsps={},this.subs=[],e&&"object"==typeof e&&(n=e,e=void 0),(n=n||{}).path=n.path||"/socket.io",this.opts=n,H(this,n),this.reconnection(!1!==n.reconnection),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(r=n.randomizationFactor)&&void 0!==r?r:.5),this.backoff=new Mt({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==n.timeout?2e4:n.timeout),this._readyState="closed",this.uri=e;const s=n.parser||t;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=!1!==n.autoConnect,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return void 0===t?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var e;return void 0===t?this._reconnectionDelay:(this._reconnectionDelay=t,null===(e=this.backoff)||void 0===e||e.setMin(t),this)}randomizationFactor(t){var e;return void 0===t?this._randomizationFactor:(this._randomizationFactor=t,null===(e=this.backoff)||void 0===e||e.setJitter(t),this)}reconnectionDelayMax(t){var e;return void 0===t?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,null===(e=this.backoff)||void 0===e||e.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new yt(this.uri,this.opts);const e=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const r=Rt(e,"open",function(){n.onopen(),t&&t()}),s=e=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",e),t?t(e):this.maybeReconnectOnOpen()},o=Rt(e,"error",s);if(!1!==this._timeout){const t=this._timeout,n=this.setTimeoutFn(()=>{r(),s(new Error("timeout")),e.close()},t);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}return this.subs.push(r),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Rt(t,"ping",this.onping.bind(this)),Rt(t,"data",this.ondata.bind(this)),Rt(t,"error",this.onerror.bind(this)),Rt(t,"close",this.onclose.bind(this)),Rt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error",t)}}ondecoded(t){ut(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,e){let n=this.nsps[t];return n?this._autoConnect&&!n.active&&n.connect():(n=new Vt(this,t,e),this.nsps[t]=n),n}_destroy(t){const e=Object.keys(this.nsps);for(const t of e){if(this.nsps[t].active)return}this._close()}_packet(t){const e=this.encoder.encode(t);for(let n=0;n<e.length;n++)this.engine.write(e[n],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,e){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,e),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const e=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),t.skipReconnect||t.open(e=>{e?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",e)):t.onreconnect()}))},e);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Jt={};function Ut(t,e){"object"==typeof t&&(e=t,t=void 0);const n=function(t,e="",n){let r=t;n=n||"undefined"!=typeof location&&location,null==t&&(t=n.protocol+"//"+n.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?n.protocol+t:n.host+t),/^(https?|wss?):\/\//.test(t)||(t=void 0!==n?n.protocol+"//"+t:"https://"+t),r=mt(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const s=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+s+":"+r.port+e,r.href=r.protocol+"://"+s+(n&&n.port===r.port?"":":"+r.port),r}(t,(e=e||{}).path||"/socket.io"),r=n.source,s=n.id,o=n.path,i=Jt[s]&&o in Jt[s].nsps;let a;return e.forceNew||e["force new connection"]||!1===e.multiplex||i?a=new Bt(r,e):(Jt[s]||(Jt[s]=new Bt(r,e)),a=Jt[s]),n.query&&!e.query&&(e.query=n.queryKey),a.socket(n.path,e)}Object.assign(Ut,{Manager:Bt,Socket:Vt,io:Ut,connect:Ut});var qt=__webpack_require__(337);class Lt extends i{type;socketId;data;static DESCRIPTOR_NAME="ChannelMessage";static DESCRIPTOR={fields:{type:{type:"uint32",id:1},socketId:{type:"string",id:2},data:{type:"bytes",id:3}}};constructor(t,e,n){super(),this.type=t,this.socketId=e,this.data=n}toJSON(){return{type:this.type,socketId:this.socketId,data:this.data}}static fromJSON(t){return new Lt(t.type,t.socketId,t.data)}}const Gt=class extends((0,n.EmitterMixin)()){_channelName;_wsGateway;_socket;constructor(t,e,n){super(),this._channelName=t,this._wsGateway=e,this._socket=n,this._subscribeToChannel()}remove(){this._socket.off(this._channelName)}getEventName(t,e=!1){let n="";return e&&(n+="all:"),n+="event",t&&(n+=":"+t),n}_subscribeToChannel(){this._socket.on(this._channelName,t=>{const e=l.decode(t,Lt);this.fire(this.getEventName(e.type,!0),e.data,e.socketId),e.socketId!==this._wsGateway.socketId&&this.fire(this.getEventName(e.type),e.data,e.socketId)})}};class Yt extends Error{context;code;data;constructor(t,e,n=null,r={}){super("cloud-services-internal-error: "+t),this.context=e,this.code=n,this.data=r,this.name="CKEditorError"}static fromPublicError(t){return new Yt(function(t){let e="cloud-services-error: "+t.message;return t.data&&(e+="\nError data: "+JSON.stringify(t.data)),t.explanation&&(e+="\nExplanation: "+t.explanation),t.action&&(e+="\nAction: "+t.action),t.traceId&&(e+="\nTraceId: "+t.traceId),t.code&&(e+="\nCode: "+t.code),e}(t),t)}}class Ht extends Error{code;traceId;data;constructor(t,e){super(),this.name="CKEditorCloudServicesServerError",this.stack=void 0,this.message=t,this.code=e.code,this.traceId=e.traceId,this.data=e.data}static fromPublicError(t){return new Ht(function(t){let e="cloud-services-server-error: "+t.message;return t.explanation&&(e+="\nExplanation: "+t.explanation),t.action&&(e+="\nAction: "+t.action),t.traceId&&(e+="\nTraceId: "+t.traceId),t.code&&(e+="\nCode: "+t.code),e}(t),t)}}class zt extends i{flags;rooms;except;static TYPE=11;static DESCRIPTOR_NAME="PacketOptionsMessage";static DESCRIPTOR={fields:{flags:{type:"string",id:1},rooms:{type:"string",id:2,rule:"repeated"},except:{type:"string",id:3,rule:"repeated"}}};constructor(t,e=[],n=[]){super(),this.flags=t,this.rooms=e,this.except=n}toJSON(){return{flags:this.flags?JSON.stringify(this.flags):void 0,rooms:this.rooms?.length?this.rooms:void 0,except:this.except?.length?this.except:void 0}}static fromJSON(t){return new zt(t.flags&&JSON.parse(t.flags),t.rooms,t.except)}}const Ft=(()=>!("undefined"==typeof process||!process.versions?.node))(),Kt=1,Wt=2,Qt=3,Zt=4;class Xt{static getPacketType(...t){let e=0;for(let n=0;n<t.length;n++)e+=t[n]*Math.pow(10,t.length-n-1);return e}static getType(t){if(Xt.isBuffer(t))return Kt;const e=typeof t;return"string"===e?Wt:"number"===e?Qt:Zt}static isBuffer(t){return Ft&&Buffer.isBuffer(t)||t instanceof ArrayBuffer||t instanceof Uint8Array||this._isBufferView(t)}static _isBufferView(t){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer}}class $t extends i{data;data1;static create(t,e){throw new TypeError("Must be implemented in a child class!")}}class te extends $t{data;data1;static TYPE=(()=>Xt.getPacketType(Qt,Kt))();static DESCRIPTOR_NAME="NumberBytesPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"uint32",id:1},data1:{type:"bytes",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new te(t.data,t.data1)}static create(t,e){return new te(t,e)}}class ee extends $t{data;data1;static TYPE=(()=>Xt.getPacketType(Wt,Kt))();static DESCRIPTOR_NAME="StringBytesPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"bytes",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new ee(t.data,t.data1)}static create(t,e){return new ee(t,e)}}class ne extends $t{data;data1;static TYPE=(()=>Xt.getPacketType(Kt,Kt))();static DESCRIPTOR_NAME="BytesBytesPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"bytes",id:1},data1:{type:"bytes",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new ne(t.data,t.data1)}static create(t,e){return new ne(t,e)}}class re extends $t{data;data1;static TYPE=(()=>Xt.getPacketType(Wt,Zt))();static DESCRIPTOR_NAME="StringObjectPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"string",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1?JSON.stringify(this.data1):void 0}}static fromJSON(t){return new re(t.data,t.data1&&JSON.parse(t.data1))}static create(t,e){return new re(t,e)}}class se extends $t{data;data1;static TYPE=(()=>Xt.getPacketType(Qt,Zt))();static DESCRIPTOR_NAME="NumberObjectPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"uint32",id:1},data1:{type:"string",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1?JSON.stringify(this.data1):void 0}}static fromJSON(t){return new se(t.data,t.data1&&JSON.parse(t.data1))}static create(t,e){return new se(t,e)}}class oe extends $t{data;data1;static TYPE=(()=>Xt.getPacketType(Zt,Zt))();static DESCRIPTOR_NAME="ObjectObjectPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"string",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data?JSON.stringify(this.data):void 0,data1:this.data1?JSON.stringify(this.data1):void 0}}static fromJSON(t){return new oe(t.data&&JSON.parse(t.data),t.data1&&JSON.parse(t.data1))}static create(t,e){return new oe(t,e)}}class ie extends $t{data;data1;static TYPE=(()=>Xt.getPacketType(Zt,Kt))();static DESCRIPTOR_NAME="ObjectBufferPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"bytes",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data?JSON.stringify(this.data):void 0,data1:this.data1}}static fromJSON(t){return new ie(t.data&&JSON.parse(t.data),t.data1)}static create(t,e){return new ie(t,e)}}class ae extends $t{data;data1;static TYPE=(()=>Xt.getPacketType(Wt,Wt))();static DESCRIPTOR_NAME="StringStringPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"string",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new ae(t.data,t.data1)}static create(t,e){return new ae(t,e)}}class ce extends $t{data;data1;static TYPE=(()=>Xt.getPacketType(Wt,Qt))();static DESCRIPTOR_NAME="StringNumberPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"uint32",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new ce(t.data,t.data1)}static create(t,e){return new ce(t,e)}}class ue extends $t{data;data1;static TYPE=(()=>Xt.getPacketType(Qt,Qt))();static DESCRIPTOR_NAME="NumberNumberPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"uint32",id:1},data1:{type:"uint32",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new ue(t.data,t.data1)}static create(t,e){return new ue(t,e)}}class de extends $t{data;data1;static TYPE=(()=>Xt.getPacketType(Qt,Wt))();static DESCRIPTOR_NAME="NumberStringPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"uint32",id:1},data1:{type:"string",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new de(t.data,t.data1)}static create(t,e){return new de(t,e)}}const le=(()=>[te,ee,ne,re,se,oe,ie,ae,ce,ue,de].reduce((t,e)=>(t[e.TYPE]=e,t),{}))();class pe extends i{type;data;id;nsp;options;static TYPE=10;static DESCRIPTOR_NAME="PacketMessage";static DESCRIPTOR={fields:{type:{type:"uint32",id:1},id:{type:"uint32",id:2},nsp:{type:"string",id:3},data:{type:"bytes",id:4},options:{type:"bytes",id:5}}};constructor(t,e,n,r="/",s){super(),this.type=t,this.data=e,this.id=n,this.nsp=r,this.options=s??new zt}get packetData(){return void 0===this.data.data&&void 0===this.data.data1?[]:this.data.data&&void 0===this.data.data1?[this.data.data]:[this.data.data,this.data.data1]}toJSON(){const t=l.encode(this.options),e=l.encode(this.data);return{type:this.type+10*this.data.constructor.TYPE,id:this.id,nsp:"/"===this.nsp?void 0:this.nsp,data:e,options:t}}static fromJSON(t){const e=Math.floor(t.type/10);return new pe(t.type-10*e,l.decode(t.data,le[e]),t.id,t.nsp,t.options?l.decode(t.options,zt):new zt)}static create(t,e={}){const n=Xt.getPacketType(Xt.getType(t.data[0]),Xt.getType(t.data[1]??t.data[0]));return new pe(t.type,le[n].create(t.data[0],t.data[1]),t.id,t.nsp,new zt(e.flags,e.rooms,e.except))}}class he{encode(t,e,n,r="/",s={}){if(e.length>2)throw new Error("PacketParser supports only 2 elements in data");const o={type:t,data:e,id:n,nsp:r};return l.encode(pe.create(o,s))}decode(t){const e=l.decode(t,pe);return{packet:{id:e.id,type:e.type,data:e.packetData,nsp:e.nsp},options:{flags:e.options.flags,rooms:e.options.rooms,except:e.options.except}}}}const fe=(()=>[Pt.EVENT,Pt.ACK,Pt.BINARY_ACK,Pt.BINARY_EVENT])();class me extends Et{_packetParser;constructor(t){super(),this._packetParser=t??new he}encode(t){if(fe.includes(t.type))try{return[this._packetParser.encode(t.type,t.data,t.id,t.nsp)]}catch(t){console.error("Can not properly serialize or deserialize messages. Check the original error.",{originalError:{message:t.message}})}return super.encode(t)}}class ye extends Dt{_packetParser;constructor(t){super(),this._packetParser=t??new he}add(t){if(!Xt.isBuffer(t))return super.add(t);let e;try{e=this._packetParser.decode(t).packet}catch(e){return super.add(t)}super.emitReserved("decoded",e)}}class ge{_context;_deferredPromise=function(){let t,e;const n=new Promise((n,r)=>{t=n,e=r});return{resolve:t,reject:e,promise:n}}();timeout;constructor(t,e){this._context=t,this.timeout=setTimeout(()=>this.error(new Yt("Request timeout.",this._context)),e)}get promise(){return this._deferredPromise.promise}response(t){this._deferredPromise.resolve(t)}error(t){this._deferredPromise.reject(t)}}class be{_context;_requests=new Set;constructor(t){this._context=t}async send(t,e=45e3){const n=this._createRequest(e);try{return t(n),await n.promise}finally{this._finishRequest(n)}}errorAll(t){for(const e of this._requests)e.error(t)}waitForAllRequests(t=45e3){return this._waitForRequests(t)}_createRequest(t){const e=new ge(this._context,t);return this._requests.add(e),e}_finishRequest(t){this._requests.delete(t),clearTimeout(t.timeout)}async _waitForRequests(t=5e3,e=0){return!this._requests.size||e>=t/500?Promise.resolve():(await new Promise(t=>{setTimeout(t,500)}),this._waitForRequests(t,e++))}}const Ie={DISCONNECTED:"disconnected",CONNECTING:"connecting",CONNECTED:"connected"};class Oe extends((0,n.ObservableMixin)()){_requestsManager;_url;_socket;_socketAuth;_channels;_connectionAttempt=0;_token;_options;_connectionProvider;_userFactory;static STATE_DISCONNECTED=(()=>Ie.DISCONNECTED)();static STATE_CONNECTING=(()=>Ie.CONNECTING)();static STATE_CONNECTED=(()=>Ie.CONNECTED)();static _CHANGE_STATE_EVENT_PRIORITY=(()=>n.priorities.get("highest")+999999)();constructor(t,e,n,r,s){if(super(),this._token=e,this._options=n??{},this._connectionProvider=r??Ut,this._userFactory=s??b.get,this._requestsManager=new be(this),this._channels=new Map,!t)throw new TypeError("Api address must be provided.");if(!this._token)throw new TypeError("Token must be provided.");this._options.requestTimeout||(this._options.requestTimeout=2e4),this._url=qt(t.replace(/^(?!(?:\w+:)?\/\/)/,"https://")),this.set("state",Ie.DISCONNECTED),this.set("socketId",void 0),this.set("me",void 0),this.on("change:state",async(t,e,n)=>{if(this._debugEvent("ws-gw:change:state",n),n!==Oe.STATE_CONNECTED){if(n===Oe.STATE_DISCONNECTED)return this._requestsManager.errorAll(new Yt("Not connected.",this))}else try{this.me=await this._userFactory.call(b,this,this._socketAuth?.userId)}catch(t){}},{priority:Oe._CHANGE_STATE_EVENT_PRIORITY}),this.on("error",(t,e)=>{this._options.onError?this._options.onError(e):console.error(e)})}get sessionId(){return this.socketId}waitForAllRequests(t){return this._requestsManager.waitForAllRequests(t)}disconnect(){this.state!==Ie.DISCONNECTED&&(this._socket?.disconnect(),this._socket=void 0,this.state=Ie.DISCONNECTED)}async reconnect(){this._socket||this.state!==Ie.DISCONNECTED||(await this._token.refreshToken(),await this._connect())}static async connect(t,e="local.cs.dev:443/ws-v2",n={},r=Ut,s=b.get){const o=new Oe(e,t,n,r,s);return await o._connect(),o}_sendRequest(t,e,n){if(!t)throw new Yt("`serviceName` must be provided.",this);if(this.state!==Oe.STATE_CONNECTED)throw new Yt("Not connected.",this);if(!this._socketAuth||!this._socketAuth.isAuthenticated)throw new Yt("Not authenticated.",this);const r=new ArrayBuffer(n.length+2),s=new Uint8Array(r);return s[0]=t,s[1]=parseInt(e),s.set(n,2),this._emit(1,s)}_getChannel(t,e){const n=""+t+e;return!this._channels.has(n)&&this._socket&&this._channels.set(n,new Gt(n,this,this._socket)),this._channels.get(n)}_connect(){return new Promise((t,e)=>{const n=this._setupSocket();!this.socketId&&n.io.on("reconnect_error",()=>{this._debugEvent("reconnect_error"),this._reconnectionAttemptError(e)}),n.once("connect",async()=>{this._debugEvent("once-connect");try{await this._onConnect(),t()}catch(t){e(t)}}),n.connect()})}_getPortByProtocol(t){return["http:","ws:"].includes(t)?80:443}_setupSocket(){if(this._socket)return this._socket;const t=this._url.port||this._getPortByProtocol(this._url.protocol),e=(this._url.protocol||"https:")+"//"+this._url.hostname+":"+t,n=this._url.pathname.match(/^\/.*\/ws/)?this._url.pathname.split("/ws")[0]:"",r=this._connectionProvider(e,{parser:{Encoder:me,Decoder:ye},path:n+"/ws-v2/ws",transports:["websocket"],timeout:void 0!==this._options.timeout?this._options.timeout:5e3,reconnection:void 0===this._options.autoReconnect||this._options.autoReconnect,reconnectionDelay:1e3,reconnectionDelayMax:5e3,rejectUnauthorized:void 0===this._options.rejectUnauthorized||this._options.rejectUnauthorized,query:{version:"53.0.1"},agent:this._options.agent??!1,closeOnBeforeunload:!1});return this.state=Ie.CONNECTING,r.on("connect",()=>{this._debugEvent("connect"),this.socketId=r.id}),r.on("connect_error",t=>{this._debugEvent("connect_error",t)}),r.on("disconnect",()=>{this._debugEvent("disconnect"),this._onDisconnect()}),r.io.on("reconnect",async()=>{this._debugEvent("reconnect"),await this._onReconnect()}),r.io.on("reconnect_attempt",t=>{this._debugEvent("reconnect_attempt",t),this.state=Ie.CONNECTING,this._connectionAttempt=t}),r.on("unauthorized",t=>{this._debugEvent("unauthorized"),this._onUnauthorized(t)}),r.on("authenticationRequest",async t=>{this._debugEvent("authenticationRequest",t.attempt),await this._onReconnect()}),this._socket=r,r}_emit(t,e){const n=this._socket;return this._requestsManager.send(r=>{n.emit(t,e,(t,e)=>{if(t)return r.error(Ht.fromPublicError(t));r.response(e)})},this._options.requestTimeout)}_addAuthData(t,e){this._socketAuth={environmentId:t,userId:e,isAuthenticated:!0}}_removeAuthData(){this._socketAuth=void 0}async _onConnect(){await this._authenticate(this._token.value),this.state=Ie.CONNECTED;const t=async(t,e,n)=>{this._debugEvent("token:value:change");try{await this._authenticate(n)}catch(t){}};this._token.on("change:value",t),this._socket.io.off("reconnect_error"),this.on("disconnect",()=>{this._token.off("change:value",t)})}async _onReconnect(){await this._token.refreshToken(),await this._onConnect()}_onDisconnect(){this.state=Ie.DISCONNECTED,this._connectionAttempt=0,this.fire("disconnect");for(const t of this._channels.values())t.remove();this._channels.clear(),void 0===this._options.autoReconnect||this._options.autoReconnect||(this._socket=void 0)}_debugEvent(t,e){if(!this._isDebugModeEnabled())return;const n=void 0!==e?", data: "+e:"";console.info((new Date).toLocaleString()+" "+t+n)}_reconnectionAttemptError(t){this._connectionAttempt>=2&&(this.disconnect(),t(Yt.fromPublicError({message:"The number of initial connection attempts exceeded.",explanation:"Three initial connection attempts failed. It can be caused by a slow, unstable, missing or blocked Internet connection.",action:"Please verify the stability of your Internet connection and ensure that no antivirus or firewall software blocks the Web Socket protocol connections."})))}_onUnauthorized({error:t}){this._removeAuthData(),this.fire("error",Ht.fromPublicError(t))}async _authenticate(t){try{this._debugEvent("authenticate:start");const e=await this._emit(2,{token:t});this._debugEvent("authenticate:success","envId: "+e.environmentId+", userId: "+e.userId),this._addAuthData(e.environmentId,e.userId)}catch(t){throw this._debugEvent("authenticate:error",t.message),this._removeAuthData(),t}}_isDebugModeEnabled(){return!!n.global.window.localStorage&&"true"===(n.global.window.localStorage.getItem("csClientDebugMode")??"false").toLowerCase()}}const ve=Oe;class we extends i{bundleVersion;static TYPE="131";static READABLE_TYPE_NAME="isEditorBundleUploaded";static DESCRIPTOR_NAME="IsEditorBundleUploadedMessage";static DESCRIPTOR={fields:{bundleVersion:{type:"string",id:1}}};constructor(t){super(),this.bundleVersion=t}toJSON(){return{bundleVersion:this.bundleVersion}}static fromJSON(t){return new we(t.bundleVersion)}}class Se extends i{isUploaded;static DESCRIPTOR_NAME="IsEditorBundleUploadedResponse";static DESCRIPTOR={fields:{isUploaded:{type:"bool",id:1}}};constructor(t){super(),this.isUploaded=t}toJSON(){return{isUploaded:this.isUploaded}}static fromJSON(t){return new Se(t.isUploaded)}}class ke extends((0,n.EmitterMixin)()){static _SERVICE=13;static async isBundleUploaded(t,e){const n=new we(e);if(t.state!==Ie.CONNECTED)throw new Yt("WebSocket Gateway is not connected.",t);const r=await t._sendRequest(ke._SERVICE,we.TYPE,l.encode(n));return l.decode(r,Se).isUploaded}}const Ae=ke;class Te extends i{documentId;revisionId;static TYPE="123";static READABLE_TYPE_NAME="getRevision";static DESCRIPTOR_NAME="RevisionHistoryGetRevisionMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1},revisionId:{type:"string",id:2}}};constructor(t,e){super(),this.documentId=t,this.revisionId=e}toJSON(){return{documentId:this.documentId,revisionId:this.revisionId}}static fromJSON(t){return new Te(t.documentId,t.revisionId)}}class _e extends o{static DESCRIPTOR_NAME="RevisionDescriptor";static DESCRIPTOR={fields:{revisionId:{type:"string",id:1},name:{type:"string",id:2},creatorId:{type:"string",id:3},authorsIds:{type:"string",id:4},diffData:{type:"string",id:5},createdAt:{type:"string",id:6},attributes:{type:"string",id:7},toVersion:{type:"uint32",id:8},fromVersion:{type:"uint32",id:9},isEmptyCurrent:{type:"bool",id:10}}};static create(t){return{revisionId:t.id,name:t.name,creatorId:t.creatorId,createdAt:t.createdAt,fromVersion:t.fromVersion,toVersion:t.toVersion,isEmptyCurrent:t.isEmptyCurrent,diffData:t.diffData?JSON.stringify(t.diffData):void 0,attributes:t.attributes,authorsIds:t.authorsIds}}static toJSON(t){return{revisionId:t.revisionId,name:t.name,creatorId:t.creatorId,authorsIds:t.authorsIds?JSON.stringify(t.authorsIds):void 0,diffData:t.diffData,createdAt:t.createdAt?.toISOString(),attributes:t.attributes?JSON.stringify(t.attributes):void 0,toVersion:t.toVersion,fromVersion:t.fromVersion,isEmptyCurrent:t.isEmptyCurrent}}static fromJSON(t){return{revisionId:(t={...t}).revisionId,name:t.name,creatorId:t.creatorId,authorsIds:t.authorsIds?JSON.parse(t.authorsIds):void 0,diffData:t.diffData,createdAt:t.createdAt?new Date(t.createdAt):void 0,attributes:t.attributes?JSON.parse(t.attributes):void 0,toVersion:t.toVersion,fromVersion:t.fromVersion,isEmptyCurrent:t.isEmptyCurrent}}static toObject(t){return function(t){for(const[e,n]of Object.entries(t))void 0===n&&delete t[e];return t}({id:t.revisionId,name:t.name,creatorId:t.creatorId,createdAt:t.createdAt,fromVersion:t.fromVersion,toVersion:t.toVersion,isEmptyCurrent:t.isEmptyCurrent,diffData:t.diffData?JSON.parse(t.diffData):void 0,attributes:t.attributes,authorsIds:t.authorsIds})}}class Ce extends i{revisionId;name;creatorId;authorsIds;createdAt;diffData;attributes;fromVersion;toVersion;isEmptyCurrent;static DESCRIPTOR_NAME="RevisionHistoryGetRevisionResponse";static DESCRIPTOR=(()=>_e.DESCRIPTOR)();constructor(t,e,n,r,s,o,i,a,c,u){super(),this.revisionId=t,this.name=e,this.creatorId=n,this.authorsIds=r,this.createdAt=s,this.diffData=o,this.attributes=i,this.fromVersion=a,this.toVersion=c,this.isEmptyCurrent=u}toJSON(){return _e.toJSON(this)}toObject(){return _e.toObject(this)}static create(t){return new Ce(t.revisionId,t.name,t.creatorId,t.authorsIds,t.createdAt,t.diffData,t.attributes,t.fromVersion,t.toVersion,t.isEmptyCurrent)}static fromJSON(t){return new Ce(t.revisionId,t.name,t.creatorId,t.authorsIds?JSON.parse(t.authorsIds):void 0,t.createdAt?new Date(t.createdAt):void 0,t.diffData,t.attributes?JSON.parse(t.attributes):void 0,t.fromVersion,t.toVersion,t.isEmptyCurrent)}}class Pe extends i{documentId;requestId;revisions;static TYPE="124";static READABLE_TYPE_NAME="updateRevisions";static DESCRIPTOR_NAME="RevisionHistoryUpdateRevisionsMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1},requestId:{type:"uint32",id:2},revisions:{type:"RevisionDescriptor",id:3,rule:"repeated"}}};constructor(t,e,n){super(),this.documentId=t,this.requestId=e,this.revisions=n}toJSON(){return{documentId:this.documentId,requestId:this.requestId,revisions:this.revisions.map(_e.toJSON)}}toObject(){return{documentId:this.documentId,requestId:this.requestId,revisions:this.revisions.map(_e.toObject)}}static create(t){return new Pe(t.documentId,t.requestId,t.revisions.map(_e.create))}static fromJSON(t){return new Pe(t.documentId,t.requestId,t.revisions.map(_e.fromJSON))}}class Ee extends i{requestId;static DESCRIPTOR_NAME="RevisionHistoryUpdateRevisionsResponse";static DESCRIPTOR={fields:{requestId:{type:"uint32",id:1}}};constructor(t){super(),this.requestId=t}toJSON(){return{requestId:this.requestId}}static fromJSON(t){return new Ee(t.requestId)}}class je extends i{documentId;static TYPE="121";static READABLE_TYPE_NAME="connectToRevisionHistory";static DESCRIPTOR_NAME="RevisionHistoryConnectMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1}}};constructor(t){super(),this.documentId=t}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new je(t.documentId)}}class De extends i{channel;requestId;revisions;static DESCRIPTOR_NAME="RevisionHistoryConnectResponse";static DESCRIPTOR={fields:{channel:{type:"string",id:1},requestId:{type:"uint32",id:2},revisions:{type:"RevisionDescriptor",id:3,rule:"repeated"}}};constructor(t,e,n){super(),this.channel=t,this.requestId=e,this.revisions=n}toJSON(){return{channel:this.channel,requestId:this.requestId,revisions:this.revisions.map(_e.toJSON)}}toObject(){return{channel:this.channel,requestId:this.requestId,revisions:this.revisions.map(_e.toObject)}}static fromJSON(t){return new De(t.channel,t.requestId,t.revisions.map(_e.fromJSON))}}class xe extends i{documentId;requestId;static TYPE="122";static READABLE_TYPE_NAME="reconnectToRevisionHistory";static DESCRIPTOR_NAME="RevisionHistoryReconnectMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1},requestId:{type:"uint32",id:2}}};constructor(t,e){super(),this.documentId=t,this.requestId=e}toJSON(){return{documentId:this.documentId,requestId:this.requestId}}static fromJSON(t){return new xe(t.documentId,t.requestId)}}class Re extends Yt{constructor(t,e){super(t+" Service is not connected.",e)}}class Ne extends((0,n.EmitterMixin)()){_documentId;_isConnected=!1;_wsGateway;_channel;static _SERVICE=12;constructor(t){super(),this._documentId=t}get isConnected(){return this._isConnected}connect(t){return this._isConnected?Promise.resolve():this._connect(t,new je(this._documentId))}disconnect(){this._isConnected&&(this._isConnected=!1,this._wsGateway&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this._channel&&(this.stopListening(this._channel),this._channel=void 0),this.fire("disconnected"),this.stopListening())}reconnect(t,e){if(this.isConnected)throw new Yt("Cannot reconnect to already connected service.",t);return this._connect(t,new xe(this._documentId,e))}async updateRevisions(t,e){const n=Pe.create({documentId:this._documentId,requestId:e,revisions:t}),r=await this._sendRequest(Pe.TYPE,n),{requestId:s}=l.decode(r,Ee);return s}async getRevision(t){const e=new Te(this._documentId,t),n=await this._sendRequest(Te.TYPE,e);return l.decode(n,Ce).toObject()}async _connect(t,e){if(t.state!==Ie.CONNECTED)throw new Yt("WebSocket Gateway is not connected.",t);this._wsGateway=t,this.stopListening(t,"change:state");const n=await t._sendRequest(12,e.constructor.TYPE,l.encode(e)),{channel:r,requestId:s,revisions:o}=l.decode(n,De).toObject();return this.listenTo(t,"change:state",(t,e,n)=>this._onWsGatewayStateChange(n),{priority:ve._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(t,r),this._isConnected=!0,this.fire("connected"),{revisions:o,requestId:s}}_connectToChannel(t,e){this._channel=t._getChannel(Ne._SERVICE,e),this._channel&&this.listenTo(this._channel,this._channel.getEventName(Pe.TYPE),(t,e)=>{const{documentId:n,requestId:r,revisions:s}=l.decode(e,Pe).toObject();this.fire("revisionsUpdated",{documentId:n,requestId:r,revisionsData:s})})}_onWsGatewayStateChange(t){t===Ie.DISCONNECTED&&this.disconnect()}_sendRequest(t,e){if(!this._wsGateway||!this._isConnected)throw new Re("Revision History",this);return this._wsGateway._sendRequest(12,t,l.encode(e))}}const Ve=Ne;class Me extends i{id;documentId;type;data;originalSuggestionId;attributes;static TYPE="101";static READABLE_TYPE_NAME="addSuggestion";static DESCRIPTOR_NAME="TrackChangesAddSuggestionMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},documentId:{type:"string",id:2},type:{type:"string",id:3},data:{type:"string",id:4},originalSuggestionId:{type:"string",id:5},attributes:{type:"string",id:6}}};constructor(t,e,n,r={},s=null,o=null){super(),this.id=t,this.documentId=e,this.type=n,this.data=r,this.originalSuggestionId=s,this.attributes=o}toJSON(){return{id:this.id,documentId:this.documentId,type:this.type,data:JSON.stringify(this.data),originalSuggestionId:this.originalSuggestionId,attributes:JSON.stringify(this.attributes)}}static fromJSON(t){return new Me(t.id,t.documentId,t.type,JSON.parse(t.data),t.originalSuggestionId??null,t.attributes?JSON.parse(t.attributes):null)}}class Be extends i{id;authorId;type;hasComments;state;data;attributes;createdAt;static DESCRIPTOR_NAME="TrackChangesAddSuggestionResponse";static DESCRIPTOR={fields:{id:{type:"string",id:1},authorId:{type:"string",id:2},type:{type:"string",id:3},createdAt:{type:"string",id:4},data:{type:"string",id:5},hasComments:{type:"bool",id:6},state:{type:"string",id:7},attributes:{type:"string",id:8}}};constructor(t,e,n,r,s,o,i={},a=null){super(),this.id=t,this.authorId=e,this.type=n,this.hasComments=s,this.state=o,this.data=i,this.attributes=a,this.createdAt=r?new Date(r):void 0}toJSON(){return{id:this.id,authorId:this.authorId,type:this.type,createdAt:this.createdAt?.toISOString(),data:JSON.stringify(this.data),hasComments:this.hasComments,state:this.state,attributes:JSON.stringify(this.attributes)}}static fromJSON(t){return new Be(t.id,t.authorId,t.type,t.createdAt,t.hasComments,t.state,JSON.parse(t.data),t.attributes?JSON.parse(t.attributes):null)}}class Je extends i{id;documentId;static TYPE="103";static READABLE_TYPE_NAME="getSuggestion";static DESCRIPTOR_NAME="TrackChangesGetSuggestionMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},documentId:{type:"string",id:2}}};constructor(t,e){super(),this.id=t,this.documentId=e}toJSON(){return{id:this.id,documentId:this.documentId}}static fromJSON(t){return new Je(t.id,t.documentId)}}class Ue extends i{id;authorId;type;hasComments;state;data;attributes;createdAt;static DESCRIPTOR_NAME="TrackChangesGetSuggestionResponse";static DESCRIPTOR={fields:{id:{type:"string",id:1},authorId:{type:"string",id:2},type:{type:"string",id:3},createdAt:{type:"string",id:4},data:{type:"string",id:5},hasComments:{type:"bool",id:6},state:{type:"string",id:7},attributes:{type:"string",id:8}}};constructor(t,e,n,r,s,o,i={},a=null){super(),this.id=t,this.authorId=e,this.type=n,this.hasComments=s,this.state=o,this.data=i,this.attributes=a,this.createdAt=new Date(r)}toJSON(){return{id:this.id,authorId:this.authorId,type:this.type,createdAt:this.createdAt.toISOString(),data:JSON.stringify(this.data),hasComments:this.hasComments,state:this.state,attributes:JSON.stringify(this.attributes)}}static fromJSON(t){return new Ue(t.id,t.authorId,t.type,t.createdAt,t.hasComments,t.state,JSON.parse(t.data),t.attributes?JSON.parse(t.attributes):null)}}class qe extends i{documentId;static TYPE="102";static READABLE_TYPE_NAME="getAllSuggestions";static DESCRIPTOR_NAME="TrackChangesGetAllSuggestionMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1}}};constructor(t){super(),this.documentId=t}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new qe(t.documentId)}}class Le extends o{static DESCRIPTOR_NAME="SuggestionDescriptor";static DESCRIPTOR={fields:{id:{id:1,type:"string"},authorId:{id:2,type:"string"},type:{id:3,type:"string"},createdAt:{id:4,type:"string"},data:{id:5,type:"string"},hasComments:{id:6,type:"bool"},state:{id:7,type:"string"},attributes:{id:8,type:"string"}}};static toJSON(t){return{...t,data:t.data?JSON.stringify(t.data):t.data,attributes:t.attributes?JSON.stringify(t.attributes):t.attributes,createdAt:t.createdAt?.toISOString()}}static fromJSON(t){return{...t,data:t.data?JSON.parse(t.data):t.data,attributes:t.attributes?JSON.parse(t.attributes):t.attributes,createdAt:t.createdAt?new Date(t.createdAt):void 0}}}class Ge extends i{_suggestions;_suggestionsV2;suggestions;static DESCRIPTOR_NAME="TrackChangesGetAllSuggestionsResponse";static DESCRIPTOR={fields:{suggestions:{type:"string",rule:"repeated",id:1},suggestionsV2:{type:"SuggestionDescriptor",rule:"repeated",id:2}}};constructor(t,e){super(),this._suggestions=t,this._suggestionsV2=e,this.suggestions=e?.length?e:t}toJSON(){return{suggestions:this._suggestions?.map(t=>JSON.stringify(t)),suggestionsV2:this._suggestionsV2?.map(Le.toJSON)}}static fromJSON(t){return new Ge(t.suggestions?.map(Ye),t.suggestionsV2?.map(Le.fromJSON))}}function Ye(t){const e=JSON.parse(t);return e.createdAt=e.createdAt?new Date(e.createdAt):void 0,e}class He extends i{id;documentId;hasComments;isHasCommentsModified;state;attributes;static TYPE="104";static READABLE_TYPE_NAME="updateSuggestion";static DESCRIPTOR_NAME="TrackChangesUpdateSuggestionMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},documentId:{type:"string",id:2},hasComments:{type:"bool",id:3},isHasCommentsModified:{type:"bool",id:4},state:{type:"string",id:5},attributes:{type:"string",id:6}}};constructor(t,e,n,r,s,o=null){super(),this.id=t,this.documentId=e,this.hasComments=n,this.isHasCommentsModified=r,this.state=s,this.attributes=o}toJSON(){return{id:this.id,documentId:this.documentId,hasComments:this.hasComments,isHasCommentsModified:this.isHasCommentsModified,state:this.state,attributes:JSON.stringify(this.attributes)}}static fromJSON(t){return new He(t.id,t.documentId,t.hasComments,t.isHasCommentsModified,t.state,t.attributes?JSON.parse(t.attributes):null)}}class ze extends i{documentId;static TYPE="105";static READABLE_TYPE_NAME="connectToSuggestions";static DESCRIPTOR_NAME="TrackChangesConnectMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1}}};constructor(t){super(),this.documentId=t}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new ze(t.documentId)}}class Fe extends i{channel;_suggestions;_suggestionsV2;suggestions;static DESCRIPTOR_NAME="TrackChangesConnectResponse";static DESCRIPTOR={fields:{channel:{type:"string",id:1},suggestions:{type:"string",rule:"repeated",id:2},suggestionsV2:{type:"SuggestionDescriptor",rule:"repeated",id:3}}};constructor(t,e,n){super(),this.channel=t,this._suggestions=e,this._suggestionsV2=n,this.suggestions=n?.length?n:e}toJSON(){return{channel:this.channel,suggestions:this._suggestions?.map(t=>JSON.stringify(t)),suggestionsV2:this._suggestionsV2?.map(Le.toJSON)}}static fromJSON(t){return new Fe(t.channel,t.suggestions?.map(t=>JSON.parse(t)),t.suggestionsV2?.map(Le.fromJSON))}}class Ke extends i{ids;documentId;state;static TYPE="106";static READABLE_TYPE_NAME="batchUpdateSuggestionsState";static DESCRIPTOR_NAME="TrackChangesBatchUpdateSuggestionsStateMessage";static DESCRIPTOR={fields:{ids:{type:"string",rule:"repeated",id:1},documentId:{type:"string",id:2},state:{type:"string",id:3}}};constructor(t,e,n){super(),this.ids=t,this.documentId=e,this.state=n}toJSON(){return{ids:this.ids,documentId:this.documentId,state:this.state}}static fromJSON(t){return new Ke(t.ids,t.documentId,t.state)}}class We extends((0,n.EmitterMixin)()){_documentId;_isConnected=!1;_wsGateway;_channel;static _SERVICE=10;constructor(t){super(),this._documentId=t}get isConnected(){return this._isConnected}async connect(t){if(this._isConnected)return;if(t.state!==Ie.CONNECTED)throw new Yt("WebSocket Gateway is not connected.",t);const e=new ze(this._documentId);this._wsGateway=t,this.stopListening(t,"change:state");const n=await t._sendRequest(10,ze.TYPE,l.encode(e)),r=l.decode(n,Fe);return this.listenTo(t,"change:state",(t,e,n)=>this._onWsGatewayStateChange(n),{priority:ve._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(t,r.channel),this._isConnected=!0,this.fire("connected"),r.suggestions}disconnect(){this._isConnected&&(this._isConnected=!1,this._wsGateway&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this._channel&&(this.stopListening(this._channel),this._channel=void 0),this.fire("disconnected"),this.stopListening())}async add(t,e,n,r=null,s){const o=new Me(t,this._documentId,e,n,r,s),i=await this._sendRequest(Me.TYPE,o);return l.decode(i,Be)}async get(t,e=1){const n=new Je(t,this._documentId);try{const t=await this._sendRequest(Je.TYPE,n);return l.decode(t,Ue)}catch(n){if("CKEditorCloudServicesServerError"===n.name&&"404"===n.code&&e<5)return await(r=100*e,new Promise(t=>{setTimeout(t,r)})),this.get(t,e+1);if("CKEditorCloudServicesServerError"===n.name)throw n;throw Ht.fromPublicError(n)}var r}async getAll(){const t=new qe(this._documentId),e=await this._sendRequest(qe.TYPE,t),{suggestions:n}=l.decode(e,Ge);return n}async update(t,e={}){const{hasComments:n,state:r,attributes:s}=e,o=void 0!==n,i=new He(t,this._documentId,n,o,r,s);await this._sendRequest(He.TYPE,i)}async batchUpdateState(t){const e=new Ke(t.ids,this._documentId,t.state);await this._sendRequest(Ke.TYPE,e)}_connectToChannel(t,e){this._channel=t._getChannel(We._SERVICE,e),this._channel&&this.listenTo(this._channel,this._channel.getEventName(He.TYPE),(t,e)=>{const n=l.decode(e,He);this.fire("suggestionUpdated",n)})}_onWsGatewayStateChange(t){t===Ie.DISCONNECTED&&this.disconnect()}_sendRequest(t,e){if(!this._wsGateway||!this._isConnected)throw new Re("Track Changes",this);return this._wsGateway._sendRequest(10,t,l.encode(e))}}const Qe=We,Ze={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Xe;const $e=new Uint8Array(16);function tn(){if(!Xe&&(Xe="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Xe))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Xe($e)}const en=[];for(let t=0;t<256;++t)en.push((t+256).toString(16).slice(1));function nn(t,e=0){return en[t[e+0]]+en[t[e+1]]+en[t[e+2]]+en[t[e+3]]+"-"+en[t[e+4]]+en[t[e+5]]+"-"+en[t[e+6]]+en[t[e+7]]+"-"+en[t[e+8]]+en[t[e+9]]+"-"+en[t[e+10]]+en[t[e+11]]+en[t[e+12]]+en[t[e+13]]+en[t[e+14]]+en[t[e+15]]}const rn=function(t,e,n){if(Ze.randomUUID&&!e&&!t)return Ze.randomUUID();const r=(t=t||{}).random||(t.rng||tn)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(let t=0;t<16;++t)e[n+t]=r[t];return e}return nn(r)};class sn extends i{channel;sockets;static DESCRIPTOR_NAME="SessionsConnectResponse";static DESCRIPTOR={fields:{channel:{type:"string",id:1},sockets:{rule:"repeated",type:"SessionsSocketDescriptor",id:2}}};constructor(t,e=[]){super(),this.channel=t,this.sockets=e}toJSON(){return{channel:this.channel,sockets:this.sockets.map(t=>({user:t.userId,session:t.id,role:t.role,permissions:t.permissions}))}}static fromJSON(t){return new sn(t.channel,t.sockets.map(t=>({id:t.session,userId:t.user,role:t.role,permissions:t.permissions})))}}class on extends i{id;sessionType;static TYPE="31";static READABLE_TYPE_NAME="getConnectedSockets";static DESCRIPTOR_NAME="SessionsConnectMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},sessionType:{type:"uint32",id:2}}};constructor(t,e){super(),this.id=t,this.sessionType=e}toJSON(){return{id:this.id,sessionType:this.sessionType}}static fromJSON(t){return new on(t.id,t.sessionType)}}class an extends i{id;userId;role;permissions;static TYPE="32";static READABLE_TYPE_NAME="connectSocket";static DESCRIPTOR_NAME="SocketConnectMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},userId:{type:"string",id:2},role:{type:"string",id:3},permissions:{rule:"repeated",type:"string",id:4}}};constructor(t,e,n,r){super(),this.id=t,this.userId=e,this.role=n,this.permissions=r}toJSON(){return{id:this.id,userId:this.userId??void 0,role:this.role??void 0,permissions:this.permissions??void 0}}static fromJSON(t){return new an(t.id,t.userId,t.role,t.permissions)}}class cn extends i{id;static TYPE="33";static READABLE_TYPE_NAME="disconnectSocket";static DESCRIPTOR_NAME="SocketDisconnectMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1}}};constructor(t){super(),this.id=t}toJSON(){return{id:this.id}}static fromJSON(t){return new cn(t.id)}}const un=class extends n.Collection{_id;_sessionType;_handlers=new Map;_channel;_wsGateway;_connected;_eventsQueue=[];_isRunning=!1;constructor(t,e){super({idProperty:"id"}),this._id=t,this._sessionType=e}async connect(t){this._wsGateway=t,this.stopListening(t,"change:state");const e=new on(this._id,this._sessionType);let n;try{const t=await this._wsGateway._sendRequest(3,on.TYPE,l.encode(e));n=l.decode(t,sn)}catch(t){n=new sn(this._id,[])}this._connectToChannel(this._wsGateway,n.channel,this._sessionType);const r=await async function(t,e){const n=e.map(t=>t.userId),r=n.length?await b.getMany(t,n):[];return e.map(t=>{const e={id:t.id,role:t.role,permissions:t.permissions};return e.user=t.userId&&r.find(e=>e.id===t.userId)||new b,e})}(this._wsGateway,n.sockets);for(const t of r)super.add(t);this._connected=!0,this.fire("connected"),this.listenTo(this._wsGateway,"change:state",(t,e,n)=>this._onWsGatewayStateChange(n),{priority:ve._CHANGE_STATE_EVENT_PRIORITY}),await this._runQueue()}disconnect(t=!0){if(this._connected){for(this._connected=!1,this._eventsQueue=[];this.length;)super.remove(0);this._channel&&(this.stopListening(this._channel),this._channel=void 0),this._wsGateway&&t&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this.fire("disconnected"),t&&this.stopListening()}}add(t,e){throw new TypeError("The collection is read-only.")}remove(t){throw new TypeError("The collection is read-only.")}_connectToChannel(t,e,n){this._channel=t._getChannel(n,e),this._channel&&(this._addHandler(this._channel,an.TYPE,async e=>{const n=l.decode(e,an);if(-1===this.getIndex(n.id)){const e={id:n.id,role:n.role,permissions:n.permissions};n.userId&&(e.user=await b.get(t,n.userId)),super.add(e)}}),this._addHandler(this._channel,cn.TYPE,t=>{const e=l.decode(t,cn);-1!==this.getIndex(e.id)&&super.remove(e.id)}))}async _onWsGatewayStateChange(t){t===ve.STATE_DISCONNECTED&&this.disconnect(!1),t===ve.STATE_CONNECTED&&await this.connect(this._wsGateway)}async _runQueue(){if(this._isRunning||!this._connected)return;let t;for(this._isRunning=!0;t=this._eventsQueue.shift();){const e=this._handlers.get(t.eventName);e&&await e(t.data)}this._isRunning=!1}_addHandler(t,e,n){const r=t.getEventName(e,!0);this.listenTo(t,r,async(t,e)=>{const n=t.name;this._eventsQueue.push({eventName:n,data:e}),await this._runQueue()}),this._handlers.set(r,n)}};class dn{static async getConnectedSessions(t,e,n){const r=new un(e,n);return await r.connect(t),r}}class ln extends i{id;buffers;types;bundleVersion;lastOperationId;static TYPE="11";static READABLE_TYPE_NAME="connectToDocument";static DESCRIPTOR_NAME="CollaborativeEditingConnectMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},bundleVersion:{type:"string",id:2},buffers:{rule:"repeated",type:"bytes",id:3},types:{rule:"repeated",type:"uint32",id:4},lastOperationId:{type:"string",id:5}}};constructor(t,e,n,r,s=""){super(),this.id=t,this.buffers=e,this.types=n,this.bundleVersion=r,this.lastOperationId=s}toJSON(){return{id:this.id,buffers:this.buffers,types:this.types,bundleVersion:this.bundleVersion,lastOperationId:this.lastOperationId}}static fromJSON(t){return new ln(t.id,t.buffers,t.types,t.bundleVersion,t.lastOperationId)}}class pn{static prepareMetadataForOperations(t,e){if(!t?.length||!e?.length)return[];const n=[];let r=0;for(const s of t)if(0!==s){if(!e[r])throw new Error("Missing metadata for a operation");n.push(e[r]),r++}else n.push(n[n.length-1]);return n}static removeUnnecessaryMetadata(t,e){if(!t?.length||!e?.length)return[];const n=[];for(let r=0;r<t.length;r++)if(0!==t[r]){if(!e[r])throw new Error("Missing metadata for a operation");n.push(e[r])}return n}}class hn extends o{static DESCRIPTOR_NAME="OperationMetadataDescriptor";static DESCRIPTOR={fields:{userId:{type:"string",id:1},type:{type:"string",id:2},createdAt:{type:"string",id:3}}};static toJSON({createdAt:t,...e}){const n={...e};return t?.toISOString&&(n.createdAt=t.toISOString()),n}static fromJSON({createdAt:t,...e}){const n={...e};return t&&(n.createdAt=new Date(t)),n}}class fn extends i{id;buffers;types;baseVersion;metadata;lastOperationId;static TYPE="13";static READABLE_TYPE_NAME="updateDocument";static DESCRIPTOR_NAME="CollaborativeEditingUpdateMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},baseVersion:{type:"uint32",id:2},buffers:{rule:"repeated",type:"bytes",id:3},types:{rule:"repeated",type:"uint32",id:4},metadata:{rule:"repeated",type:"OperationMetadataDescriptor",id:6},lastOperationId:{type:"string",id:7}}};constructor(t,e,n,r,s=[],o=""){super(),this.id=t,this.buffers=e,this.types=n,this.baseVersion=r,this.metadata=s,this.lastOperationId=o}get data(){return{buffers:this.buffers,types:this.types,baseVersion:this.baseVersion,lastOperationId:this.lastOperationId}}toJSON(){return{id:this.id,buffers:this.buffers,types:this.types,baseVersion:this.baseVersion,metadata:pn.removeUnnecessaryMetadata(this.types,this.metadata).map(hn.toJSON),lastOperationId:this.lastOperationId}}static fromJSON(t){return new fn(t.id,t.buffers,t.types,t.baseVersion,pn.prepareMetadataForOperations(t.types,t.metadata).map(hn.fromJSON),t.lastOperationId)}}class mn extends i{id;lastKnowVersion;bundleVersion;static TYPE="12";static READABLE_TYPE_NAME="reconnectToDocument";static DESCRIPTOR_NAME="CollaborativeEditingReconnectMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},bundleVersion:{type:"string",id:2},lastKnowVersion:{type:"uint32",id:3}}};constructor(t,e,n){super(),this.id=t,this.lastKnowVersion=e,this.bundleVersion=n}toJSON(){return{id:this.id,bundleVersion:this.bundleVersion,lastKnowVersion:this.lastKnowVersion}}static fromJSON(t){return new mn(t.id,t.lastKnowVersion,t.bundleVersion)}}class yn extends i{version;buffers;types;metadata;lastOperationId;lastOperationAcceptedAt;static DESCRIPTOR_NAME="CollaborativeEditingResponse";static DESCRIPTOR={fields:{version:{type:"uint32",id:1},buffers:{rule:"repeated",type:"bytes",id:2},types:{rule:"repeated",type:"uint32",id:3},metadata:{rule:"repeated",type:"OperationMetadataDescriptor",id:5},lastOperationId:{type:"string",id:6},lastOperationAcceptedAt:{type:"string",id:7}}};constructor(t,e=[],n=[],r=[],s="",o=null){super(),this.version=t,this.buffers=e,this.types=n,this.metadata=r,this.lastOperationId=s,this.lastOperationAcceptedAt=o}get data(){return{buffers:this.buffers,types:this.types,baseVersion:this.version-this.types.length,lastOperationId:this.lastOperationId,lastOperationAcceptedAt:this.lastOperationAcceptedAt}}get wereChangesApplied(){return!this.types?.length}toJSON(){return{version:this.version,buffers:this.buffers,types:this.types,metadata:pn.removeUnnecessaryMetadata(this.types,this.metadata).map(hn.toJSON),lastOperationId:this.lastOperationId,lastOperationAcceptedAt:this.lastOperationAcceptedAt instanceof Date?this.lastOperationAcceptedAt.toISOString():this.lastOperationAcceptedAt}}static fromJSON(t){return new yn(t.version,t.buffers,t.types,pn.prepareMetadataForOperations(t.types,t.metadata).map(hn.fromJSON),t.lastOperationId,t.lastOperationAcceptedAt?new Date(t.lastOperationAcceptedAt):null)}static create(t){return new yn(t.version,t.buffers,t.types,t.metadata,t.lastOperationId,t.lastOperationAcceptedAt?new Date(t.lastOperationAcceptedAt):null)}}class gn extends i{channel;version;buffers;types;offset;metadata;initData;sessionId;lastOperationId;sessionCreatedAt;static DESCRIPTOR_NAME="CollaborativeEditingConnectResponse";static DESCRIPTOR=(()=>({fields:{channel:{type:"string",id:1},offset:{type:"uint32",id:2},version:{type:"uint32",id:3},buffers:{rule:"repeated",type:"bytes",id:4},types:{rule:"repeated",type:"uint32",id:5},metadata:{rule:"repeated",type:hn.DESCRIPTOR_NAME,id:7},initData:{type:"string",id:8},isInitialized:{type:"bool",id:9},sessionId:{type:"string",id:10},lastOperationId:{type:"string",id:11},sessionCreatedAt:{type:"string",id:12}}}))();constructor(t,e,n=[],r=[],s=0,o=[],i=null,a="",c="",u=null){super(),this.channel=t,this.version=e,this.buffers=n,this.types=r,this.offset=s,this.metadata=o,this.initData=i,this.sessionId=a,this.lastOperationId=c,this.sessionCreatedAt=u}get data(){return{buffers:this.buffers,types:this.types,baseVersion:this.version-this.types.length,lastOperationId:this.lastOperationId,sessionCreatedAt:this.sessionCreatedAt}}get wereChangesApplied(){return!this.types?.length&&null===this.initData}toJSON(){return{channel:this.channel,version:this.version,sessionId:this.sessionId,buffers:this.buffers,types:this.types,offset:this.offset,metadata:pn.removeUnnecessaryMetadata(this.types,this.metadata).map(hn.toJSON),initData:this.initData??"",isInitialized:"string"==typeof this.initData,lastOperationId:this.lastOperationId,sessionCreatedAt:this.sessionCreatedAt?this.sessionCreatedAt.toISOString():null}}static create(t){return new gn(t.channel,t.version,t.buffers,t.types,t.offset,t.metadata,t.initData,t.sessionId,t.lastOperationId,t.sessionCreatedAt)}static fromJSON(t){let e=null;return!0===t.isInitialized?e=t.initData??"":"boolean"!=typeof t.isInitialized&&t.initData&&(e=t.initData),gn.create({channel:t.channel,version:t.version,buffers:t.buffers,types:t.types,offset:t.offset,metadata:pn.prepareMetadataForOperations(t.types,t.metadata).map(hn.fromJSON),initData:e,sessionId:t.sessionId,lastOperationId:t.lastOperationId,sessionCreatedAt:t.sessionCreatedAt?new Date(t.sessionCreatedAt):null})}}class bn extends i{lastDocumentSession;currentDocumentSession;static DESCRIPTOR_NAME="GetDocumentDetailsResponse";static DESCRIPTOR={fields:{lastDocumentSessionId:{type:"string",id:1},lastDocumentSessionOperationId:{type:"string",id:2},currentDocumentSessionId:{type:"string",id:3},currentDocumentSessionVersion:{type:"uint32",id:4},currentDocumentSessionOperationId:{type:"string",id:5}}};constructor(t,e){super(),this.lastDocumentSession=t,this.currentDocumentSession=e}get data(){return{lastDocumentSessionId:this.lastDocumentSession?.id,lastDocumentSessionOperationId:this.lastDocumentSession?.lastOperationId,currentDocumentSessionId:this.currentDocumentSession?.id,currentDocumentSessionVersion:this.currentDocumentSession?.version,currentDocumentSessionOperationId:this.currentDocumentSession?.lastOperationId}}toJSON(){return{lastDocumentSessionId:this.lastDocumentSession?.id,lastDocumentSessionOperationId:this.lastDocumentSession?.lastOperationId,currentDocumentSessionId:this.currentDocumentSession?.id,currentDocumentSessionVersion:this.currentDocumentSession?.version,currentDocumentSessionOperationId:this.currentDocumentSession?.lastOperationId}}static fromJSON(t){const e=t.lastDocumentSessionId?{id:t.lastDocumentSessionId,lastOperationId:t.lastDocumentSessionOperationId}:void 0,n=t.currentDocumentSessionId?{lastOperationId:t.currentDocumentSessionOperationId,version:t.currentDocumentSessionVersion,id:t.currentDocumentSessionId}:void 0;return new bn(e,n)}}class In extends i{documentId;static TYPE="14";static READABLE_TYPE_NAME="getDocumentDetails";static DESCRIPTOR_NAME="GetDocumentDetailsMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1},environmentId:{type:"string",id:2}}};constructor(t){super(),this.documentId=t}get data(){return{documentId:this.documentId}}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new In(t.documentId)}}const On=class extends((0,n.EmitterMixin)()){static _SERVICE=1;_bundleVersion;_id;_isConnected;_wsGateway;_channel;_connectedSessions;constructor(t,e){if(super(),!t)throw new TypeError('Param "bundleVersion" must be provided.');this._id=e??rn(),this._isConnected=!1,this._bundleVersion=t}getId(){return this._id}isConnected(){return this._isConnected}connect(t,e={buffers:[],types:[]},n){const r=new ln(this.getId(),e.buffers,e.types,this._bundleVersion,n);return this._connect(t,r)}reconnect(t,e){if(this.isConnected())throw new Yt("Cannot reconnect to already connected service.",t);return this._connect(t,new mn(this.getId(),e,this._bundleVersion))}disconnect(){this._isConnected&&(this._isConnected=!1,this._wsGateway&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this._channel&&(this.stopListening(this._channel),this._channel=void 0),this._connectedSessions&&(this._connectedSessions.disconnect(),this._connectedSessions=void 0),this.fire("disconnected"),this.stopListening())}async getDocumentDetails(){const t=new In(this.getId());if(!this._wsGateway)throw new Re("Collaborative Editing",this);const e=await this._wsGateway._sendRequest(1,In.TYPE,l.encode(t));return l.decode(e,bn)}async sendOperations(t,e,n){if(!t?.types?.length)throw new Yt("Cannot send empty update.",this._wsGateway);const r="number"==typeof e?e:parseInt(e);if(!Number.isInteger(r)||r<0)throw new Yt("Base version not provided.",this._wsGateway);const s=new fn(this.getId(),t.buffers,t.types,r,[],n);if(!this._wsGateway||!this._isConnected)throw new Re("Collaborative Editing",this);const o=await this._wsGateway._sendRequest(1,fn.TYPE,l.encode(s));return l.decode(o,yn)}async getConnectedSessions(){if(!this._isConnected)throw new Re("Collaborative Editing",this);return this._connectedSessions||(this._connectedSessions=await dn.getConnectedSessions(this._wsGateway,this._id,1)),this._connectedSessions}static getConnectedSessions(t,e){return dn.getConnectedSessions(t,e,1)}async _connect(t,e){if(this.isConnected())return;if(t.state!==ve.STATE_CONNECTED)throw new Yt("WebSocket Gateway is not connected.",t);this._wsGateway=t,this.stopListening(t,"change:state");const n=await t._sendRequest(1,e.constructor.TYPE,l.encode(e)),r=l.decode(n,gn);return this.listenTo(t,"change:state",(t,e,n)=>this._onWsGatewayStateChange(n),{priority:ve._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(t,r.channel),this._isConnected=!0,this.fire("connected"),r}_connectToChannel(t,e){this._channel=t._getChannel(1,e),this.listenTo(this._channel,this._channel.getEventName(fn.TYPE),(t,e)=>{const n=l.decode(e,fn);this.fire("operationsReceived",n.baseVersion,n.data,n.metadata)})}_onWsGatewayStateChange(t){t===ve.STATE_DISCONNECTED&&this.disconnect()}};class vn extends o{static DESCRIPTOR_NAME="CommentDescriptor";static DESCRIPTOR={fields:{commentId:{id:1,type:"string"},commentThreadId:{id:2,type:"string"},userId:{id:3,type:"string"},content:{id:4,type:"string"},documentId:{id:5,type:"string"},createdAt:{id:6,type:"string"},attributes:{id:7,type:"string"}}};static toJSON(t){return{...t,createdAt:t.createdAt?.toISOString(),attributes:t.attributes?JSON.stringify(t.attributes):null}}static fromJSON(t){return{...t,createdAt:new Date(t.createdAt),attributes:t.attributes?JSON.parse(t.attributes):null}}}class wn extends o{static DESCRIPTOR_NAME="CommentsThreadDescriptor";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},comments:{type:"CommentDescriptor",rule:"repeated",id:2},resolvedAt:{type:"string",id:3},resolvedBy:{type:"string",id:4},context:{type:"string",id:5},createdAt:{type:"string",id:6},deletedAt:{type:"string",id:7},attributes:{type:"string",id:8},unlinkedAt:{type:"string",id:9}}};static toJSON(t){return{...t,createdAt:t.createdAt?.toISOString(),deletedAt:t.deletedAt?.toISOString(),resolvedAt:t.resolvedAt?.toISOString(),attributes:t.attributes?JSON.stringify(t.attributes):null,context:t.context?JSON.stringify(t.context):t.context,comments:t.comments?.map(vn.toJSON),unlinkedAt:t.unlinkedAt?.toISOString()}}static fromJSON(t){return{...t,createdAt:t.createdAt?new Date(t.createdAt):void 0,deletedAt:t.deletedAt?new Date(t.deletedAt):void 0,resolvedAt:t.resolvedAt?new Date(t.resolvedAt):void 0,attributes:t.attributes?JSON.parse(t.attributes):null,context:t.context?JSON.parse(t.context):void 0,comments:t.comments?.map(vn.fromJSON),unlinkedAt:t.unlinkedAt?new Date(t.unlinkedAt):void 0}}}class Sn extends i{documentId;commentThreadId;content;commentId;userId;attributes;commentThread;createdAt;static TYPE="91";static READABLE_TYPE_NAME="addComment";static DESCRIPTOR_NAME="CommentsV2AddCommentMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},content:{type:"string",id:2},documentId:{type:"string",id:3},commentId:{type:"string",id:4},createdAt:{type:"string",id:5},userId:{type:"string",id:6},attributes:{type:"string",id:7},commentThread:{type:"CommentsThreadDescriptor",id:8}}};constructor(t,e,n,r="",s,o="",i=null,a){super(),this.documentId=t,this.commentThreadId=e,this.content=n,this.commentId=r,this.userId=o,this.attributes=i,this.commentThread=a,this.createdAt=s?new Date(s):""}toJSON(){return{commentThreadId:this.commentThreadId,content:this.content,documentId:this.documentId,commentId:this.commentId,createdAt:this.createdAt instanceof Date?this.createdAt.toISOString():this.createdAt,userId:this.userId,attributes:JSON.stringify(this.attributes),commentThread:this.commentThread?wn.toJSON(this.commentThread):void 0}}static fromJSON(t){return new Sn(t.documentId,t.commentThreadId,t.content,t.commentId?t.commentId:void 0,t.createdAt?new Date(t.createdAt):void 0,t.userId?t.userId:void 0,t.attributes?JSON.parse(t.attributes):{},t.commentThread?wn.fromJSON(t.commentThread):void 0)}}class kn extends i{commentThreadId;commentId;createdAt;static DESCRIPTOR_NAME="CommentsV2AddCommentResponse";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},commentId:{type:"string",id:2},createdAt:{type:"string",id:3}}};constructor(t,e,n){super(),this.commentThreadId=t,this.commentId=e,this.createdAt=new Date(n)}toJSON(){return{commentThreadId:this.commentThreadId,commentId:this.commentId,createdAt:this.createdAt.toISOString()}}static fromJSON(t){return new kn(t.commentThreadId,t.commentId,t.createdAt)}}class An extends i{documentId;static TYPE="92";static READABLE_TYPE_NAME="connectToComment";static DESCRIPTOR_NAME="CommentsV2ConnectMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1}}};constructor(t){super(),this.documentId=t}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new An(t.documentId)}}class Tn extends i{channel;_threads;_threadsV2;threads;static DESCRIPTOR_NAME="CommentsV2ConnectResponse";static DESCRIPTOR={fields:{channel:{type:"string",id:1},threads:{type:"string",rule:"repeated",id:2},threadsV2:{type:"CommentsThreadDescriptor",rule:"repeated",id:3}}};constructor(t,e,n){super(),this.channel=t,this._threads=e,this._threadsV2=n,this.threads=n?.length?n:e}toJSON(){return{channel:this.channel,threads:this._threads?.map(t=>JSON.stringify(t)),threadsV2:this._threadsV2?.map(wn.toJSON)}}static fromJSON(t){return new Tn(t.channel,t.threads?.map(t=>JSON.parse(t)),t.threadsV2?.map(wn.fromJSON))}}class _n extends i{documentId;commentThreadId;commentId;static TYPE="95";static READABLE_TYPE_NAME="removeComment";static DESCRIPTOR_NAME="CommentsV2RemoveCommentMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},commentId:{type:"string",id:2},documentId:{type:"string",id:3}}};constructor(t,e,n){super(),this.documentId=t,this.commentThreadId=e,this.commentId=n}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId,commentId:this.commentId}}static fromJSON(t){return new _n(t.documentId,t.commentThreadId,t.commentId)}}class Cn extends i{documentId;commentThreadId;static TYPE="97";static READABLE_TYPE_NAME="removeCommentThread";static DESCRIPTOR_NAME="CommentsV2RemoveCommentThreadMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2}}};constructor(t,e){super(),this.documentId=t,this.commentThreadId=e}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId}}static fromJSON(t){return new Cn(t.documentId,t.commentThreadId)}}class Pn extends i{documentId;commentThreadId;commentId;content;attributes;isAttributesUpdated;commentThread;static TYPE="96";static READABLE_TYPE_NAME="updateComment";static DESCRIPTOR_NAME="CommentsV2UpdateCommentMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},commentId:{type:"string",id:2},content:{type:"string",id:3},documentId:{type:"string",id:4},attributes:{type:"string",id:5},isAttributesUpdated:{type:"bool",id:6},commentThread:{type:"CommentsThreadDescriptor",id:7}}};constructor(t,e,n,r,s=null,o=!1,i){super(),this.documentId=t,this.commentThreadId=e,this.commentId=n,this.content=r,this.attributes=s,this.isAttributesUpdated=o,this.commentThread=i}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId,commentId:this.commentId,content:this.content,attributes:this.attributes?JSON.stringify(this.attributes):null,isAttributesUpdated:this.isAttributesUpdated,commentThread:this.commentThread?wn.toJSON(this.commentThread):void 0}}static fromJSON(t){return new Pn(t.documentId,t.commentThreadId,t.commentId,t.content,t.attributes?JSON.parse(t.attributes):null,t.isAttributesUpdated,t.commentThread?wn.fromJSON(t.commentThread):void 0)}}class En extends i{commentThreadId;documentId;static TYPE="93";static READABLE_TYPE_NAME="getComment";static DESCRIPTOR_NAME="CommentsV2GetCommentThreadMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2}}};constructor(t,e){super(),this.commentThreadId=t,this.documentId=e}toJSON(){return{commentThreadId:this.commentThreadId,documentId:this.documentId}}static fromJSON(t){return new En(t.commentThreadId,t.documentId)}}class jn extends i{commentThreadId;_comments;_commentsV2;resolvedBy;comments;createdAt;deletedAt;resolvedAt;attributes;context;unlinkedAt;static DESCRIPTOR_NAME="CommentsV2GetCommentThreadResponse";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},comments:{type:"string",rule:"repeated",id:2},commentsV2:{type:"CommentDescriptor",rule:"repeated",id:3},resolvedAt:{type:"string",id:4},resolvedBy:{type:"string",id:5},context:{type:"string",id:6},createdAt:{type:"string",id:7},deletedAt:{type:"string",id:8},attributes:{type:"string",id:9},unlinkedAt:{type:"string",id:10}}};constructor(t,e,n,r,s,o,i,a,c,u){super(),this.commentThreadId=t,this._comments=e,this._commentsV2=n,this.resolvedBy=s,this.comments=n?.length?n:e,this.createdAt=i?new Date(i):void 0,this.deletedAt="string"==typeof a?new Date(a):a,this.resolvedAt="string"==typeof c?new Date(c):c,this.unlinkedAt="string"==typeof u?new Date(u):u,this.attributes="string"==typeof r?JSON.parse(r):r,this.context="string"==typeof o?JSON.parse(o):o}toJSON(){return{commentThreadId:this.commentThreadId,comments:this._comments?.map(t=>JSON.stringify(t)),commentsV2:this._commentsV2?.map(vn.toJSON),attributes:this.attributes?JSON.stringify(this.attributes):this.attributes,context:this.context?JSON.stringify(this.context):this.context,resolvedBy:this.resolvedBy,createdAt:this.createdAt?.toISOString(),deletedAt:this.deletedAt?.toISOString(),resolvedAt:this.resolvedAt?.toISOString(),unlinkedAt:this.unlinkedAt?.toISOString()}}static fromJSON(t){return new jn(t.commentThreadId,t.comments?.map(t=>function(t){const e=JSON.parse(t);return{...e,createdAt:new Date(e.createdAt)}}(t)),t.commentsV2?.map(vn.fromJSON),t.attributes?JSON.parse(t.attributes):t.attributes,t.resolvedBy,t.context?JSON.parse(t.context):t.context,t.createdAt,t.deletedAt,t.resolvedAt,t.unlinkedAt)}}class Dn extends i{documentId;static TYPE="94";static READABLE_TYPE_NAME="getDocumentThreads";static DESCRIPTOR_NAME="CommentsV2GetDocumentThreadsMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1}}};constructor(t){super(),this.documentId=t}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new Dn(t.documentId)}}class xn extends i{_threads;_threadsV2;threads;static DESCRIPTOR_NAME="CommentsV2GetDocumentThreadsResponse";static DESCRIPTOR={fields:{threads:{type:"string",rule:"repeated",id:1},threadsV2:{type:"CommentsThreadDescriptor",rule:"repeated",id:2}}};constructor(t,e){super(),this._threads=t,this._threadsV2=e,this.threads=e?.length?e:t}toJSON(){return{threads:this._threads?.map(t=>JSON.stringify(t)),threadsV2:this._threadsV2?.map(wn.toJSON)}}static fromJSON(t){return new xn(t.threads?.map(t=>function(t){const e=JSON.parse(t),n={...e};return e.comments&&(n.comments=e.comments?.map(t=>({...t,createdAt:new Date(t.createdAt)}))),n}(t)),t.threadsV2?.map(wn.fromJSON))}}class Rn extends o{static DESCRIPTOR_NAME="CommentThreadAddedCommentDescriptor";static DESCRIPTOR={fields:{commentId:{id:1,type:"string"},createdAt:{id:2,type:"string"}}};static toJSON(t){return{commentId:t.commentId,createdAt:t.createdAt?.toISOString()}}static fromJSON(t){return{commentId:t.commentId,createdAt:new Date(t.createdAt)}}}class Nn extends i{commentThreadId;comments;createdAt;static DESCRIPTOR_NAME="CommentsV2AddCommentThreadResponse";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},createdAt:{type:"string",id:2},comments:{type:"CommentThreadAddedCommentDescriptor",rule:"repeated",id:3}}};constructor(t,e,n=[]){super(),this.commentThreadId=t,this.comments=n,this.createdAt=new Date(e)}toJSON(){return{commentThreadId:this.commentThreadId,createdAt:this.createdAt.toISOString(),comments:this.comments.map(t=>Rn.toJSON(t))}}static fromJSON(t){return new Nn(t.commentThreadId,t.createdAt,t.comments.map(t=>Rn.fromJSON(t)))}}class Vn extends i{documentId;commentThreadId;comments;context;resolvedBy;attributes;createdAt;resolvedAt;deletedAt;static TYPE="140";static READABLE_TYPE_NAME="addCommentThread";static DESCRIPTOR_NAME="CommentsV2AddCommentThreadMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1},commentThreadId:{type:"string",id:2},context:{type:"string",id:3},createdAt:{type:"string",id:4},resolvedAt:{type:"string",id:5},resolvedBy:{type:"string",id:6},attributes:{type:"string",id:7},deletedAt:{type:"string",id:8},comments:{type:"CommentDescriptor",rule:"repeated",id:9}}};constructor(t,e,n=[],r,s=null,o=null,i=null,a=null,c=null){super(),this.documentId=t,this.commentThreadId=e,this.comments=n,this.context=r,this.resolvedBy=s,this.attributes=c,this.createdAt=o?new Date(o):"",this.resolvedAt=i?new Date(i):"",this.deletedAt=a?new Date(a):""}toJSON(){return{commentThreadId:this.commentThreadId,context:this.context?JSON.stringify(this.context):this.context,documentId:this.documentId,resolvedBy:this.resolvedBy,resolvedAt:this.resolvedAt instanceof Date?this.resolvedAt.toISOString():this.resolvedAt,deletedAt:this.deletedAt instanceof Date?this.deletedAt.toISOString():this.deletedAt,createdAt:this.createdAt instanceof Date?this.createdAt.toISOString():this.createdAt,attributes:this.attributes?JSON.stringify(this.attributes):this.attributes,comments:this.comments?.map(t=>vn.toJSON(t))}}static fromJSON(t){return new Vn(t.documentId,t.commentThreadId,t.comments?.map(e=>vn.fromJSON({...e,documentId:t.documentId,commentThreadId:t.commentThreadId})),t.context?JSON.parse(t.context):t.context,t.resolvedBy,t.createdAt?new Date(t.createdAt):void 0,t.resolvedAt?new Date(t.resolvedAt):void 0,t.deletedAt?new Date(t.deletedAt):void 0,t.attributes?JSON.parse(t.attributes):t.attributes)}}class Mn extends i{commentThreadId;documentId;resolvedBy;resolvedAt;static TYPE="142";static READABLE_TYPE_NAME="resolveCommentThread";static DESCRIPTOR_NAME="CommentsV2ResolveCommentThreadMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2},resolvedBy:{type:"string",id:3},resolvedAt:{type:"string",id:4}}};constructor(t,e,n,r){super(),this.commentThreadId=t,this.documentId=e,this.resolvedBy=n,this.resolvedAt=r?new Date(r):void 0}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId,resolvedBy:this.resolvedBy,resolvedAt:this.resolvedAt?.toISOString()}}static fromJSON(t){return new Mn(t.commentThreadId,t.documentId,t.resolvedBy,t.resolvedAt)}}class Bn extends i{commentThreadId;documentId;static TYPE="141";static READABLE_TYPE_NAME="reopenCommentThread";static DESCRIPTOR_NAME="CommentsV2ReopenCommentThreadMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2}}};constructor(t,e){super(),this.commentThreadId=t,this.documentId=e}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId}}static fromJSON(t){return new Bn(t.commentThreadId,t.documentId)}}class Jn extends i{commentThreadId;documentId;context;attributes;unlinkedAt;static TYPE="143";static READABLE_TYPE_NAME="updateCommentThread";static DESCRIPTOR_NAME="CommentsV2UpdateCommentThreadMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2},context:{type:"string",id:3},attributes:{type:"string",id:4},unlinkedAt:{type:"string",id:5}}};constructor(t,e,n,r=null,s=null){super(),this.commentThreadId=t,this.documentId=e,this.context=n,this.attributes=r,this.unlinkedAt=s?new Date(s):""}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId,context:this.context?JSON.stringify(this.context):this.context,attributes:this.attributes?JSON.stringify(this.attributes):null,unlinkedAt:this.unlinkedAt instanceof Date?this.unlinkedAt.toISOString():this.unlinkedAt}}static fromJSON(t){return new Jn(t.commentThreadId,t.documentId,t.context?JSON.parse(t.context):t.context,t.attributes?JSON.parse(t.attributes):null,t.unlinkedAt?new Date(t.unlinkedAt):null)}}class Un extends i{commentThreadId;documentId;resolvedBy;resolvedAt;static DESCRIPTOR_NAME="CommentsV2ResolveCommentThreadResponse";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2},resolvedAt:{type:"string",id:3},resolvedBy:{type:"string",id:4}}};constructor(t,e,n,r){super(),this.commentThreadId=t,this.documentId=e,this.resolvedBy=n,this.resolvedAt=new Date(r)}toJSON(){return{commentThreadId:this.commentThreadId,documentId:this.documentId,resolvedBy:this.resolvedBy,resolvedAt:this.resolvedAt.toISOString()}}static fromJSON(t){return new Un(t.commentThreadId,t.documentId,t.resolvedBy,t.resolvedAt)}}class qn extends((0,n.EmitterMixin)()){_documentId;_isConnected=!1;_wsGateway;_channel;_connectedSessions;static _SERVICE=9;constructor(t){super(),this._documentId=t}get isConnected(){return this._isConnected}async connect(t){if(this._isConnected)return;if(t.state!==Ie.CONNECTED)throw new Yt("WebSocket Gateway is not connected.",t);const e=new An(this._documentId);this._wsGateway=t,this.stopListening(t,"change:state");const n=await t._sendRequest(9,An.TYPE,l.encode(e)),{channel:r,threads:s}=l.decode(n,Tn);return this.listenTo(t,"change:state",(t,e,n)=>this._onWsGatewayStateChange(n),{priority:ve._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(t,r),this._isConnected=!0,this.fire("connected"),s}disconnect(){this._isConnected&&(this._isConnected=!1,this._wsGateway&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this._channel&&(this.stopListening(this._channel),this._channel=void 0),this._connectedSessions&&(this._connectedSessions.disconnect(),this._connectedSessions=void 0),this.fire("disconnected"),this.stopListening())}async addComment(t,e,n,r){const s=new Sn(this._documentId,t,n,e,void 0,void 0,r),o=await this._sendRequest(Sn.TYPE,s);return l.decode(o,kn)}async updateComment(t,e,n,r){const s=void 0!==r,o=new Pn(this._documentId,t,e,n,r,s);await this._sendRequest(Pn.TYPE,o)}async removeComment(t,e){const n=new _n(this._documentId,t,e);await this._sendRequest(_n.TYPE,n)}async removeCommentThread(t){const e=new Cn(this._documentId,t);await this._sendRequest(Cn.TYPE,e)}async addCommentThread(t){const e=new Vn(this._documentId,t.commentThreadId,t.comments?.map(e=>({...e,documentId:this._documentId,commentThreadId:t.commentThreadId})),t.context,t.resolvedBy,t.createdAt,t.resolvedAt,t.deletedAt,t.attributes),n=await this._sendRequest(Vn.TYPE,e);return l.decode(n,Nn)}async resolveCommentThread(t){const e=new Mn(t,this._documentId),n=await this._sendRequest(Mn.TYPE,e);return l.decode(n,Un)}async reopenCommentThread(t){const e=new Bn(t,this._documentId);await this._sendRequest(Bn.TYPE,e)}async updateCommentThread(t){const e=new Jn(t.commentThreadId,this._documentId,t.context,t.attributes,t.unlinkedAt);await this._sendRequest(Jn.TYPE,e)}async getCommentThread(t,e=1){const n=new En(t,this._documentId);try{const t=await this._sendRequest(En.TYPE,n),e=l.decode(t,jn);return{commentThreadId:e.commentThreadId,comments:e.comments,attributes:e.attributes,context:e.context,resolvedAt:e.resolvedAt,resolvedBy:e.resolvedBy,deletedAt:e.deletedAt,unlinkedAt:e.unlinkedAt}}catch(n){if("CKEditorCloudServicesServerError"===n.name&&"404"===n.code&&e<5)return await(r=100*e,new Promise(t=>{setTimeout(t,r)})),this.getCommentThread(t,e+1);if("CKEditorCloudServicesServerError"===n.name)throw n;throw Ht.fromPublicError(n)}var r}async getDocumentThreads(){const t=new Dn(this._documentId),e=await this._sendRequest(Dn.TYPE,t),{threads:n}=l.decode(e,xn);return{threads:n}}async getConnectedSessions(){if(!this._isConnected)throw new Re("Comments",this);return this._connectedSessions||(this._connectedSessions=await dn.getConnectedSessions(this._wsGateway,this._documentId,9)),this._connectedSessions}_connectToChannel(t,e){this._channel=t._getChannel(qn._SERVICE,e),this._channel&&(this.listenTo(this._channel,this._channel.getEventName(Sn.TYPE),(t,e)=>{const n=l.decode(e,Sn);this.fire("commentAdded",n)}),this.listenTo(this._channel,this._channel.getEventName(_n.TYPE),(t,e)=>{const n=l.decode(e,_n);this.fire("commentRemoved",n)}),this.listenTo(this._channel,this._channel.getEventName(Pn.TYPE),(t,e)=>{const n=l.decode(e,Pn);this.fire("commentUpdated",n)}),this.listenTo(this._channel,this._channel.getEventName(Cn.TYPE),(t,e)=>{const n=l.decode(e,Cn);this.fire("commentThreadRemoved",n)}),this.listenTo(this._channel,this._channel.getEventName(Vn.TYPE),(t,e)=>{const n=l.decode(e,Vn);this.fire("commentThreadAdded",n)}),this.listenTo(this._channel,this._channel.getEventName(Jn.TYPE),(t,e)=>{const n=l.decode(e,Jn);this.fire("commentThreadUpdated",n)}),this.listenTo(this._channel,this._channel.getEventName(Mn.TYPE),(t,e)=>{const n=l.decode(e,Mn);this.fire("commentThreadResolved",n)}),this.listenTo(this._channel,this._channel.getEventName(Bn.TYPE),(t,e)=>{const n=l.decode(e,Bn);this.fire("commentThreadReopened",n)}))}_onWsGatewayStateChange(t){t===Ie.DISCONNECTED&&this.disconnect()}_sendRequest(t,e){if(!this._wsGateway||!this._isConnected)throw new Re("Comments",this);return this._wsGateway._sendRequest(9,t,l.encode(e))}}const Ln=qn,Gn=Yn;function Yn(t,e){const n=zn();return(Yn=function(t,e){return n[t-=276]})(t,e)}!function(t){const e=Yn,n=t();for(;;)try{if(890193===-parseInt(e(300))/1+-parseInt(e(315))/2*(parseInt(e(328))/3)+-parseInt(e(287))/4*(-parseInt(e(285))/5)+parseInt(e(279))/6*(-parseInt(e(319))/7)+-parseInt(e(335))/8+-parseInt(e(324))/9*(-parseInt(e(308))/10)+parseInt(e(277))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(zn);class Hn extends e.ContextPlugin{static[Gn(299)]=(()=>ve)();static[Gn(298)]=1e3;[Gn(281)];[Gn(293)];[Gn(348)];[Gn(342)];static get[Gn(330)](){return[Gn(316),r.Notification]}static get[Gn(301)](){return Gn(299)}static get[Gn(292)](){return!0}static get[Gn(340)](){return!0}constructor(t){const e=Gn;super(t),this[e(304)](e(327),Ie[e(312)]),this[e(304)](e(343),!1),this[e(293)]=new Set,this[e(348)]=!1,this[e(342)]=new((0,n.DomEmitterMixin)())}[Gn(278)](){const t=Gn,e=this[t(345)],s=e[t(334)][t(303)](t(316)),o=e[t(334)][t(303)](r.Notification);if(!s[t(326)])throw new n.CKEditorError(t(311),this);if(!s[t(313)])throw new n.CKEditorError(t(290),this);return this[t(342)][t(309)](window,t(288),()=>this[t(343)]=!0),this[t(342)][t(309)](window,t(331),()=>this[t(343)]=!1),this[t(345)][t(297)][t(349)](t(323),10),this[t(345)][t(297)][t(349)](t(310),20),Hn[t(299)][t(337)](s[t(326)],s[t(313)],{timeout:1e3*this[t(345)][t(297)][t(303)](t(323)),requestTimeout:1e3*this[t(345)][t(297)][t(303)](t(310))})[t(321)](e=>{const r=t;if(this[r(281)]=e,this[r(286)](r(327)).to(e,r(327),this,r(343),(t,e)=>(r(306)!==t&&(this[r(348)]=!0),e||t!==Ie[r(312)]?Ie[r(296)]:this[r(327)]==Ie[r(296)]&&this[r(348)]?(this[r(348)]=!1,this[r(302)](),Ie[r(307)]):Ie[r(312)])),this[r(281)].on(r(280),(t,e)=>{const s=r;if(s(295)!==e[s(339)])throw console[s(280)](e),new n.CKEditorError(s(276),null,{originalError:e});o[s(294)](s(325),{title:s(346),namespace:s(333)})}),!e.me)return new Promise(t=>e.on(r(289),t))})[t(284)](e=>{const r=t;throw console[r(280)](e),new n.CKEditorError(r(276),null,{originalError:e})})}[Gn(282)](t){const e=Gn;if(e(283)!=typeof t[e(329)])throw new n.CKEditorError(e(336),this);if(this[e(305)](t))throw new n.CKEditorError(e(317),this,{name:t[e(322)][e(301)]});this[e(293)][e(314)](t)}[Gn(350)](t){const e=Gn;this[e(293)][e(318)](t)}[Gn(305)](t){const e=Gn;return this[e(293)][e(291)](t)}[Gn(302)](){const t=Gn;return this[t(281)][t(329)]()[t(321)](()=>Promise[t(341)](Array[t(332)](this[t(293)],e=>e[t(329)]())))[t(321)](()=>this[t(327)]=Ie[t(312)])[t(284)](e=>{const r=t;throw console[r(280)](e),new n.CKEditorError(r(344),this[r(345)])})}[Gn(338)](){const t=Gn;this[t(281)]&&this[t(281)][t(338)](),this[t(327)]=Ie[t(296)],this[t(342)][t(320)]()}[Gn(347)](){const t=Gn;this[t(338)](),super[t(347)]()}}function zn(){const t=["context","Connected users limit exceeded","destroy","_shouldPluginsReconnect","define","removeFromReconnectionStack","cloudservices-init","41117274JyRcMc","init","4917918UsijBy","error","connection","addToReconnectionStack","function","catch","4080185jYXsIK","bind","4JsOXUx","offline","change:me","websocketgateway-missing-websocket-url","has","isOfficialPlugin","_reconnectionStack","showWarning","limitExceeded","DISCONNECTED","config","initialReconnectionInterval","WebSocketGateway","1711627DmoUiu","pluginName","_reconnect","get","set","isInReconnectionStack","connected","CONNECTING","7390etsWnR","listenTo","cloudServices.requestTimeout","websocketgateway-missing-token","CONNECTED","webSocketUrl","add","2IwSfKQ","CloudServices","websocketgateway-plugin-already-registered","delete","7oWBIZx","stopListening","then","constructor","cloudServices.connectionTimeout","3843rVenYh","The limit of maximum concurrent connections that the collaboration server can handle has been reached. Try opening the document again in a few minutes. Please contact your system administrator if the problem persists.","token","state","1894845ntSLUD","reconnect","requires","online","from","real-time-collaboration","plugins","6531488svLzJi","websocketgateway-invalid-plugin-interface","connect","disconnect","code","isPremiumPlugin","all","_domEmitter","_isBrowserOffline","cloudservices-reconnection-error"];return(zn=function(){return t})()}var Fn=__webpack_require__(211);const Kn=Wn;function Wn(t,e){const n=Zn();return(Wn=function(t,e){return n[t-=290]})(t,e)}!function(t){const e=Wn,n=t();for(;;)try{if(308121===parseInt(e(296))/1*(parseInt(e(324))/2)+-parseInt(e(336))/3+-parseInt(e(330))/4*(parseInt(e(317))/5)+-parseInt(e(322))/6*(parseInt(e(335))/7)+parseInt(e(308))/8*(parseInt(e(347))/9)+parseInt(e(341))/10+parseInt(e(321))/11*(parseInt(e(313))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Zn);class Qn extends e.ContextPlugin{[Kn(314)];[Kn(333)];[Kn(349)];[Kn(301)];[Kn(334)];[Kn(338)];static get[Kn(298)](){return Kn(297)}static get[Kn(354)](){return!0}static get[Kn(318)](){return!0}static get[Kn(325)](){return[Hn,Fn.Users]}constructor(t){const e=Kn;super(t),this[e(314)]=new Map,this[e(333)]=new Map,this[e(349)]=new n.Collection,this[e(301)]=new Map,this[e(334)]=0,this[e(338)]=this[e(300)][e(332)][e(311)](Fn.Users)}[Kn(327)](){const t=Kn,e=this[t(300)][t(332)][t(311)](Hn);this[t(290)](e,t(310),(e,n,r)=>{const s=t;if(s(343)!==r)this[s(314)][s(329)](t=>t[s(295)]()),this[s(333)][s(329)](t=>t[s(295)]()),this[s(349)][s(295)]();else for(const[t,e]of this[s(301)])for(const n of e)this[s(345)](t,n)}),this[t(326)](e[t(339)].me,!0)}[Kn(353)](t,e){const r=Kn;if(this[r(301)][r(299)](t))throw new n.CKEditorError(r(350),null,{channelId:t});this[r(301)][r(304)](t,e),this[r(314)][r(304)](t,new n.Collection),this[r(333)][r(304)](t,new n.Collection),this[r(290)](e,r(352),(e,n)=>this[r(345)](t,n)),this[r(290)](e,r(319),(e,n)=>this[r(348)](t,n));for(const n of e)this[r(345)](t,n)}[Kn(292)](t){const e=Kn;if(!this[e(301)][e(299)](t))throw new n.CKEditorError(e(337),null,{channelId:t});const r=this[e(301)][e(311)](t);this[e(340)](r);for(const n of r)e(343)===this[e(300)][e(332)][e(311)](Hn)[e(302)]&&this[e(348)](t,n);this[e(301)][e(303)](t),this[e(314)][e(303)](t),this[e(333)][e(303)](t)}get[Kn(307)](){const t=Kn;return this[t(300)][t(332)][t(311)](Hn)[t(339)][t(291)]}[Kn(305)](t){const e=Kn;for(const n of this[e(314)][e(323)]())for(const r of n)if(r.id===t)return r[e(351)]}[Kn(293)](t,e){const n=Kn,r=e?[this[n(314)][n(311)](e)]:this[n(314)][n(323)](),s=new Set;for(const e of r)for(const r of e)r[n(351)].id===t.id&&s[n(352)](r.id);return s}[Kn(320)](t){const e=Kn;for(const n of this[e(314)][e(323)]())for(const r of n)if(r[e(351)]===t)return r[e(294)]}[Kn(345)](t,e){const n=Kn;if(n(343)!==this[n(300)][n(332)][n(311)](Hn)[n(302)])return;const r=e[n(351)],s=this[n(338)][n(316)](r.id)||this[n(326)](r),o=Object[n(315)]({},e,{user:s});if(this[n(314)][n(311)](t)[n(352)](o),!r[n(306)]){const e=this[n(333)][n(311)](t);e[n(299)](s.id)||e[n(352)](s),this[n(349)][n(299)](s.id)||r[n(306)]||this[n(349)][n(352)](s,s[n(328)]?0:void 0)}this[n(346)](n(342)+t,{channelId:t,session:o})}[Kn(348)](t,e){const n=Kn;if(n(343)!==this[n(300)][n(332)][n(311)](Hn)[n(302)])return;const r=this[n(333)][n(311)](t),s=e[n(351)];s.id&&(this[n(314)][n(311)](t)[n(319)](e.id),r[n(299)](s.id)&&!this[n(293)](s,t)[n(344)]&&r[n(319)](s.id),this[n(349)][n(311)](s.id)&&!this[n(293)](s)[n(344)]&&this[n(349)][n(319)](s.id))}[Kn(326)](t,e){const n=Kn,r=this[n(338)][n(331)](t);return e&&this[n(338)][n(312)](t.id),r[n(309)]=this[n(334)]++,r}}function Zn(){const t=["sessions-register-already-registered","user","add","register","isOfficialPlugin","listenTo","sessionId","unregister","getUserSessions","role","clear","14106FGYQOc","Sessions","pluginName","has","context","_registeredSessions","state","delete","set","getUserBySessionId","hiddenInPresenceList","mySessionId","730024ratInE","orderNumber","change:state","get","defineMe","93684iCkCPn","channelSessions","assign","getUser","798725iQfJVL","isPremiumPlugin","remove","getUserRole","143XiYZYp","4326dXKlAx","values","46leJIuh","requires","_createUser","init","isMe","forEach","8qoYyiq","addUser","plugins","channelConnectedUsers","_uniqueUsersCount","98LxAbMk","1525398qjuJbD","sessions-unregister-not-exist","_users","connection","stopListening","2639770SaRESd","sessionAdd:","connected","size","_handleSessionAdd","fire","45tPhxEk","_handleSessionRemove","allConnectedUsers"];return(Zn=function(){return t})()}var Xn=__webpack_require__(6),$n=__webpack_require__.n(Xn),tr=__webpack_require__(602),er=__webpack_require__.n(tr),nr=__webpack_require__(557),rr=__webpack_require__.n(nr),sr=__webpack_require__(302),or=__webpack_require__.n(sr),ir=__webpack_require__(290),ar=__webpack_require__.n(ir),cr=__webpack_require__(117),ur={attributes:{"data-cke":!0}};ur.setAttributes=or(),ur.insert=rr().bind(null,"head"),ur.domAPI=er(),ur.insertStyleElement=ar();$n()(cr.A,ur);cr.A&&cr.A.locals&&cr.A.locals;const dr=pr;function lr(){const t=["hasDomSelection","model",'⁠<span class="ck-user__marker-line" contenteditable="false"><span class="ck-user__marker-dot"></span></span>',"addMarker","createElement","color","ck-user__selection","highest","5274143zeilDJ","updateMarker","name","change:range","getCustomProperty","isInline","init","user:position","user:","isPremiumPlugin","userPositionMarker","textContent","Escape","createUserMarkerOperations","getUserBySessionId","for","fromRange","ck-user__marker ","marker","2IyjyPM","isDocumentOperation","afterInit","outerHTML","getPositions","selection","createRange","requires","UserMarkers","pluginName","user:range","rootName","markerNameToElements","mouseleave","oldRange","toRange","user:position:","contenteditable","30wijniJ","enqueueChange","getRange","user:range:","getContainedElement","editing","6720220lOaFVS","parent","commands","addEventListener","markerToHighlight","957826ninwpT","view","isOfficialPlugin","render","has","ck-user__marker_hovered","isObject","getNearestSelectionRange","split","element","markerName","detach","editingDowncast","keydown","getFirstRange","orderNumber","batch","nodeAfter","plugins","set","_createdBatches","removeMarker","document","schema","editor","isLimit","mapper","markerRange","mySessionId","classList","tableCell","toDomElement","startsWith","checkChild","type","conversion","end","getSelectionClass","false","destroy","mouseenter","span","reconvertMarker","markerToElement","listenTo","spellcheck","196ZMrAKb","add","innerHTML","_domEmitter","isSimilar","20247oGOjGJ","setCustomProperty","remove","deletionPosition","getMarkerClass","getStart","hasContent","undo","newRange","data-session-id","getAttribute","change","736765lrkoYk","2466792OoJZVj","$text","stopListening","size","isCollapsed","get","removeClass","$graveyard","root","10029969GDDaVE","createUIElement","start","setAttribute","ck-user__marker-tooltip","update:user:range","applyOperation","delete","markers","clear"];return(lr=function(){return t})()}function pr(t,e){const n=lr();return(pr=function(t,e){return n[t-=246]})(t,e)}!function(t){const e=pr,n=t();for(;;)try{if(683929===parseInt(e(263))/1*(parseInt(e(373))/2)+-parseInt(e(314))/3*(-parseInt(e(309))/4)+-parseInt(e(326))/5*(-parseInt(e(252))/6)+parseInt(e(354))/7+-parseInt(e(327))/8+-parseInt(e(336))/9+-parseInt(e(258))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(lr);class hr extends e.Plugin{[dr(312)]=new((0,n.DomEmitterMixin)());static get[dr(380)](){return[Qn]}static get[dr(382)](){return dr(381)}static get[dr(265)](){return!0}static get[dr(363)](){return!0}[dr(360)](){const t=dr,e=this[t(287)],r=e[t(281)][t(332)](Qn);e[t(298)][t(369)](t(275))[t(306)]({model:t(361),view:(n,{writer:s})=>function(e,n,r,s){const o=t,i=e[o(273)][o(271)](":")[2],a=r[o(368)](i);if(!a||i===r[o(291)])return;if(!s[o(347)][o(286)][o(296)](e[o(290)][o(338)],o(328)))return;const c={class:o(371)+a[o(351)][o(318)](),"data-name":a[o(356)],"data-session-id":i},u=s[o(347)][o(344)][o(332)](e[o(273)])[o(319)](),d=u[o(280)],l=s[o(347)][o(286)];if(d&&l[o(269)](d)&&l[o(359)](d)&&!s[o(347)][o(344)][o(332)](o(255)+i)[o(254)]()[o(331)])return;const p=u[o(259)];return s[o(347)][o(286)][o(288)](p)&&!s[o(347)][o(320)](p)&&(c[o(251)]=!1),function(t,e,n){const r=o,s=t[r(337)](r(304),e);return t[r(315)](r(364),!0,s),s[r(266)]=function(t){const e=r,s=this[e(294)](t),o=document[e(350)](e(304));return o[e(292)][e(310)](e(340)),o[e(339)](e(251),e(301)),o[e(339)](e(308),e(301)),o[e(365)]=n[e(356)],s[e(311)]=e(348)+o[e(376)]+"⁠",s[e(261)](e(303),()=>{const t=e;s[t(292)][t(310)](t(268))}),s[e(261)](e(247),()=>{const t=e;s[t(292)][t(316)](t(268))}),s},s[r(313)]=function(t){const e=r;return!(!this[e(358)](e(364))||!t[e(358)](e(364))||this[e(324)](e(323))!=t[e(324)](e(323)))},s}(n,c,a)}(n,s,r,e)}),e[t(298)][t(369)](t(275))[t(262)]({model:t(383),view:e=>function(e,n){const r=t,s=e[r(273)][r(271)](":")[2];if(s===n[r(291)])return null;const o=n[r(368)](s);return o?{id:s,classes:[r(352),o[r(351)][r(300)]()],attributes:{"data-session-id":s},priority:2e3+o[r(278)]}:{id:s,classes:[]}}(e,r)}),function(e){const n=t,r=e[n(347)],o=new Map,i=e[n(281)][n(332)](Qn);r[n(344)].on(n(341),(t,a,c,u)=>{const d=n;if(!u&&o[d(332)](a[d(356)]))return o[d(332)](a[d(356)])[d(274)](),void o[d(343)](a[d(356)]);const l=a[d(356)][d(271)](":")[2];if(l===i[d(291)])return;const p=d(250)+l;r[d(344)][d(267)](p)&&e[d(257)][d(305)](p),a.on(d(357),(t,e,n)=>{const i=d;if(i(334)!=e[i(335)][i(384)]&&i(334)==a[i(254)]()[i(335)][i(384)]&&!o[i(267)](a[i(356)])){const t=r[i(286)][i(270)](n[i(317)]);if(t){const e=s.ModelLiveRange[i(370)](t);o[i(282)](a[i(356)],e),e.on(i(357),(t,n,s)=>{const c=i;if(c(334)==e[c(335)][c(384)]){const t=r[c(286)][c(270)](s[c(317)]);t?(e[c(338)]=t[c(338)],e[c(299)]=t[c(299)]):(o[c(343)](a[c(356)]),e[c(274)]())}})}}})}),r[n(285)].on(n(325),()=>{const t=n;o[t(330)]>0&&r[t(253)]({isUndoable:!1},e=>{const n=t;for(const[t,s]of o)n(334)==r[n(344)][n(332)](t)[n(254)]()[n(335)][n(384)]&&(fr(t[n(271)](":")[2],s[n(249)](),r,e),s[n(274)]());o[n(345)]()})})}(e),this[t(312)][t(307)](n.global[t(285)],t(276),(n,{key:r})=>{const s=t;s(366)===r&&function(t){const e=s;t[e(257)][e(264)][e(325)](n=>{const r=e;for(const e of t[r(347)][r(344)]){if(!e[r(356)][r(295)](r(361)))continue;const s=t[r(257)][r(289)][r(246)](e[r(356)]);if(s)for(const t of s)n[r(333)](r(268),t)}})}(e)},{useCapture:!0})}[dr(375)](){const t=dr,e=this[t(287)],n=e[t(260)][t(332)](t(321));n&&e[t(347)].on(t(342),(r,s)=>{const o=t,i=s[0];if(!i[o(374)])return;if(o(372)!=i[o(297)]||!i[o(356)][o(295)](o(362)))return;const a=i[o(279)];n[o(283)][o(267)](a)&&(i[o(322)]=i[o(248)]?e[o(347)][o(379)](i[o(248)][o(338)],i[o(248)][o(299)]):null)},{priority:t(353)})}[dr(302)](){const t=dr;return this[t(312)][t(329)](),super[t(302)]()}[dr(367)](){const t=dr,e=this[t(287)],n=e[t(347)][t(285)],r=e[t(281)][t(332)](Qn);e[t(347)][t(253)]({isUndoable:!1},s=>{const o=t,i=o(255)+r[o(291)],a=o(250)+r[o(291)],c=e[o(347)][o(344)][o(267)](i);e[o(257)][o(264)][o(346)]?fr(r[o(291)],n[o(378)][o(277)](),e[o(347)],s):c&&(s[o(284)](i),s[o(284)](a))})}}function fr(t,e,n,r){const s=dr,o=s(255)+t,i=s(250)+t,a=e[s(256)]();let c=e[s(338)];if(a&&a.is(s(272),s(293))){const t=function(t,e){const n=s;for(const r of t[n(377)]())if(e[n(286)][n(296)](r,n(328)))return r}(e,n);t&&(c=t,e=r[s(379)](c))}const u=r[s(379)](c);n[s(344)][s(267)](o)?(r[s(355)](o,{range:e}),r[s(355)](i,{range:u})):(r[s(349)](o,{range:e,usingOperation:!0}),r[s(349)](i,{range:u,usingOperation:!0}))}function mr(t,e,n){const r=t.t,s=t.t;switch(e){case"PENDING_ACTION_SENDING_DATA":return s({string:"Sending data to the server.",id:"PENDING_ACTION_SENDING_DATA"});case"The local document and server document differ and merging them can cause unexpected behavior. To not lose your content save it locally and refresh the editor.":return s("The local document and server document differ and merging them can cause unexpected behavior. To not lose your content save it locally and refresh the editor.");case"The document cannot be connected back to the server. To not lose your content save it locally and refresh the editor.":return s("The document cannot be connected back to the server. To not lose your content save it locally and refresh the editor.");case"The document details could not be taken during the reconnection. To not lose your content save it locally and refresh the editor.":return s("The document details could not be taken during the reconnection. To not lose your content save it locally and refresh the editor.");case"The last saved version of the document does not match the local version. To not lose your content save it locally and refresh the editor.":return s("The last saved version of the document does not match the local version. To not lose your content save it locally and refresh the editor.");case"Synchronization issue":return s("Synchronization issue");case"Connected users list dropdown menu":return s("Connected users list dropdown menu");case"Collapsed connected users list (press ENTER to open it)":return s("Collapsed connected users list (press ENTER to open it)");case"Connected users list":return s("Connected users list");case"PENDING_ACTION_REVISION_HISTORY":return r({string:"Unsaved change in revision history.",id:"PENDING_ACTION_REVISION_HISTORY"});case"CONNECTED_USERS":return s({string:"1 connected user (me)",plural:"%0 connected users",id:"CONNECTED_USERS"},n);default:return""}}function yr(t,e){var n=br();return(yr=function(t,e){return n[t-=487]})(t,e)}!function(t){for(var e=yr,n=t();;)try{if(970885===-parseInt(e(496))/1+-parseInt(e(565))/2*(-parseInt(e(566))/3)+parseInt(e(629))/4+parseInt(e(586))/5*(-parseInt(e(521))/6)+parseInt(e(529))/7*(parseInt(e(584))/8)+parseInt(e(559))/9*(-parseInt(e(492))/10)+parseInt(e(579))/11*(-parseInt(e(644))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(br);const gr=(()=>{var t=yr,e=u[t(537)],n=u[t(619)],r=u[t(630)],s=u[t(654)][t(607)]||(u[t(654)][t(607)]={});return s[t(648)]=function(){var o=t;function i(t){var e=yr;if(t)for(var n=Object[e(498)](t),r=0;r<n[e(562)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(613)][o(524)]=null,i[o(613)][o(612)]="",i[o(613)][o(611)]=!1,i[o(613)][o(580)]="",i[o(613)][o(639)]=!1,i[o(613)][o(601)]="",i[o(613)][o(574)]=!1,i[o(531)]=function(t){return new i(t)},i[o(548)]=function(t,e){var r=o;return e||(e=n[r(531)]()),null!=t[r(524)]&&Object[r(552)][r(489)](t,r(524))&&s[r(545)][r(548)](t[r(524)],e[r(588)](10)[r(543)]())[r(577)](),null!=t[r(612)]&&Object[r(552)][r(489)](t,r(612))&&e[r(588)](18)[r(535)](t[r(612)]),null!=t[r(611)]&&Object[r(552)][r(489)](t,r(611))&&e[r(588)](24)[r(541)](t[r(611)]),null!=t[r(580)]&&Object[r(552)][r(489)](t,r(580))&&e[r(588)](34)[r(535)](t[r(580)]),null!=t[r(639)]&&Object[r(552)][r(489)](t,r(639))&&e[r(588)](40)[r(541)](t[r(639)]),null!=t[r(601)]&&Object[r(552)][r(489)](t,r(601))&&e[r(588)](50)[r(535)](t[r(601)]),null!=t[r(574)]&&Object[r(552)][r(489)](t,r(574))&&e[r(588)](56)[r(541)](t[r(574)]),e},i[o(533)]=function(t,e){var n=o;return this[n(548)](t,e)[n(577)]()},i[o(628)]=function(t,n){var r=o;t instanceof e||(t=e[r(531)](t));for(var i=void 0===n?t[r(516)]:t[r(515)]+n,a=new(s[r(648)]);t[r(515)]<i;){var c=t[r(588)]();switch(c>>>3){case 1:a[r(524)]=s[r(545)][r(628)](t,t[r(588)]());break;case 2:a[r(612)]=t[r(535)]();break;case 3:a[r(611)]=t[r(541)]();break;case 4:a[r(580)]=t[r(535)]();break;case 5:a[r(639)]=t[r(541)]();break;case 6:a[r(601)]=t[r(535)]();break;case 7:a[r(574)]=t[r(541)]();break;default:t[r(488)](7&c)}}return a},i[o(642)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(628)](t,t[n(588)]())},i[o(643)]=function(t){var e=o;if(e(589)!=typeof t||null===t)return e(655);if(null!=t[e(524)]&&t[e(552)](e(524))){var n=s[e(545)][e(643)](t[e(524)]);if(n)return e(567)+n}return null!=t[e(612)]&&t[e(552)](e(612))&&!r[e(490)](t[e(612)])?e(510):null!=t[e(611)]&&t[e(552)](e(611))&&e(530)!=typeof t[e(611)]?e(632):null!=t[e(580)]&&t[e(552)](e(580))&&!r[e(490)](t[e(580)])?e(602):null!=t[e(639)]&&t[e(552)](e(639))&&e(530)!=typeof t[e(639)]?e(595):null!=t[e(601)]&&t[e(552)](e(601))&&!r[e(490)](t[e(601)])?e(647):null!=t[e(574)]&&t[e(552)](e(574))&&e(530)!=typeof t[e(574)]?e(564):null},i[o(494)]=function(t){var e=o;if(t instanceof s[e(648)])return t;var n=new(s[e(648)]);if(null!=t[e(524)]){if(e(589)!=typeof t[e(524)])throw TypeError(e(638));n[e(524)]=s[e(545)][e(494)](t[e(524)])}return null!=t[e(612)]&&(n[e(612)]=String(t[e(612)])),null!=t[e(611)]&&(n[e(611)]=Boolean(t[e(611)])),null!=t[e(580)]&&(n[e(580)]=String(t[e(580)])),null!=t[e(639)]&&(n[e(639)]=Boolean(t[e(639)])),null!=t[e(601)]&&(n[e(601)]=String(t[e(601)])),null!=t[e(574)]&&(n[e(574)]=Boolean(t[e(574)])),n},i[o(609)]=function(t,e){var n=o;e||(e={});var r={};return e[n(587)]&&(r[n(524)]=null,r[n(612)]="",r[n(611)]=!1,r[n(580)]="",r[n(639)]=!1,r[n(601)]="",r[n(574)]=!1),null!=t[n(524)]&&t[n(552)](n(524))&&(r[n(524)]=s[n(545)][n(609)](t[n(524)],e)),null!=t[n(612)]&&t[n(552)](n(612))&&(r[n(612)]=t[n(612)]),null!=t[n(611)]&&t[n(552)](n(611))&&(r[n(611)]=t[n(611)]),null!=t[n(580)]&&t[n(552)](n(580))&&(r[n(580)]=t[n(580)]),null!=t[n(639)]&&t[n(552)](n(639))&&(r[n(639)]=t[n(639)]),null!=t[n(601)]&&t[n(552)](n(601))&&(r[n(601)]=t[n(601)]),null!=t[n(574)]&&t[n(552)](n(574))&&(r[n(574)]=t[n(574)]),r},i[o(613)][o(509)]=function(){var t=o;return this[t(615)][t(609)](this,u[t(630)][t(527)])},i[o(555)]=function(t){var e=o;return void 0===t&&(t=e(519)),t+e(663)},i}(),s[t(523)]=function(){var o=t;function i(t){var e=yr;if(this[e(538)]=[],t)for(var n=Object[e(498)](t),r=0;r<n[e(562)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(613)][o(641)]=null,i[o(613)][o(538)]=r[o(544)],i[o(613)][o(617)]=!1,i[o(613)][o(574)]=!1,i[o(531)]=function(t){return new i(t)},i[o(548)]=function(t,e){var r=o;if(e||(e=n[r(531)]()),null!=t[r(641)]&&Object[r(552)][r(489)](t,r(641))&&s[r(517)][r(548)](t[r(641)],e[r(588)](10)[r(543)]())[r(577)](),null!=t[r(538)]&&t[r(538)][r(562)])for(var i=0;i<t[r(538)][r(562)];++i)s[r(600)][r(548)](t[r(538)][i],e[r(588)](18)[r(543)]())[r(577)]();return null!=t[r(617)]&&Object[r(552)][r(489)](t,r(617))&&e[r(588)](24)[r(541)](t[r(617)]),null!=t[r(574)]&&Object[r(552)][r(489)](t,r(574))&&e[r(588)](32)[r(541)](t[r(574)]),e},i[o(533)]=function(t,e){var n=o;return this[n(548)](t,e)[n(577)]()},i[o(628)]=function(t,n){var r=o;t instanceof e||(t=e[r(531)](t));for(var i=void 0===n?t[r(516)]:t[r(515)]+n,a=new(s[r(523)]);t[r(515)]<i;){var c=t[r(588)]();switch(c>>>3){case 1:a[r(641)]=s[r(517)][r(628)](t,t[r(588)]());break;case 2:a[r(538)]&&a[r(538)][r(562)]||(a[r(538)]=[]),a[r(538)][r(554)](s[r(600)][r(628)](t,t[r(588)]()));break;case 3:a[r(617)]=t[r(541)]();break;case 4:a[r(574)]=t[r(541)]();break;default:t[r(488)](7&c)}}return a},i[o(642)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(628)](t,t[n(588)]())},i[o(643)]=function(t){var e=o;if(e(589)!=typeof t||null===t)return e(655);if(null!=t[e(641)]&&t[e(552)](e(641))&&(r=s[e(517)][e(643)](t[e(641)])))return e(514)+r;if(null!=t[e(538)]&&t[e(552)](e(538))){if(!Array[e(592)](t[e(538)]))return e(571);for(var n=0;n<t[e(538)][e(562)];++n){var r;if(r=s[e(600)][e(643)](t[e(538)][n]))return e(570)+r}}return null!=t[e(617)]&&t[e(552)](e(617))&&e(530)!=typeof t[e(617)]?e(534):null!=t[e(574)]&&t[e(552)](e(574))&&e(530)!=typeof t[e(574)]?e(564):null},i[o(494)]=function(t){var e=o;if(t instanceof s[e(523)])return t;var n=new(s[e(523)]);if(null!=t[e(641)]){if(e(589)!=typeof t[e(641)])throw TypeError(e(495));n[e(641)]=s[e(517)][e(494)](t[e(641)])}if(t[e(538)]){if(!Array[e(592)](t[e(538)]))throw TypeError(e(491));n[e(538)]=[];for(var r=0;r<t[e(538)][e(562)];++r){if(e(589)!=typeof t[e(538)][r])throw TypeError(e(556));n[e(538)][r]=s[e(600)][e(494)](t[e(538)][r])}}return null!=t[e(617)]&&(n[e(617)]=Boolean(t[e(617)])),null!=t[e(574)]&&(n[e(574)]=Boolean(t[e(574)])),n},i[o(609)]=function(t,e){var n=o;e||(e={});var r={};if((e[n(504)]||e[n(587)])&&(r[n(538)]=[]),e[n(587)]&&(r[n(641)]=null,r[n(617)]=!1,r[n(574)]=!1),null!=t[n(641)]&&t[n(552)](n(641))&&(r[n(641)]=s[n(517)][n(609)](t[n(641)],e)),t[n(538)]&&t[n(538)][n(562)]){r[n(538)]=[];for(var i=0;i<t[n(538)][n(562)];++i)r[n(538)][i]=s[n(600)][n(609)](t[n(538)][i],e)}return null!=t[n(617)]&&t[n(552)](n(617))&&(r[n(617)]=t[n(617)]),null!=t[n(574)]&&t[n(552)](n(574))&&(r[n(574)]=t[n(574)]),r},i[o(613)][o(509)]=function(){var t=o;return this[t(615)][t(609)](this,u[t(630)][t(527)])},i[o(555)]=function(t){var e=o;return void 0===t&&(t=e(519)),t+e(651)},i}(),s[t(540)]=function(){var o=t;function i(t){var e=yr;if(t)for(var n=Object[e(498)](t),r=0;r<n[e(562)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(613)][o(627)]="",i[o(613)][o(582)]=null,i[o(613)][o(532)]=null,i[o(613)][o(616)]=!1,i[o(613)][o(574)]=!1,i[o(531)]=function(t){return new i(t)},i[o(548)]=function(t,e){var r=o;return e||(e=n[r(531)]()),null!=t[r(627)]&&Object[r(552)][r(489)](t,r(627))&&e[r(588)](10)[r(535)](t[r(627)]),null!=t[r(582)]&&Object[r(552)][r(489)](t,r(582))&&s[r(545)][r(548)](t[r(582)],e[r(588)](18)[r(543)]())[r(577)](),null!=t[r(532)]&&Object[r(552)][r(489)](t,r(532))&&s[r(545)][r(548)](t[r(532)],e[r(588)](26)[r(543)]())[r(577)](),null!=t[r(616)]&&Object[r(552)][r(489)](t,r(616))&&e[r(588)](32)[r(541)](t[r(616)]),null!=t[r(574)]&&Object[r(552)][r(489)](t,r(574))&&e[r(588)](40)[r(541)](t[r(574)]),e},i[o(533)]=function(t,e){var n=o;return this[n(548)](t,e)[n(577)]()},i[o(628)]=function(t,n){var r=o;t instanceof e||(t=e[r(531)](t));for(var i=void 0===n?t[r(516)]:t[r(515)]+n,a=new(s[r(540)]);t[r(515)]<i;){var c=t[r(588)]();switch(c>>>3){case 1:a[r(627)]=t[r(535)]();break;case 2:a[r(582)]=s[r(545)][r(628)](t,t[r(588)]());break;case 3:a[r(532)]=s[r(545)][r(628)](t,t[r(588)]());break;case 4:a[r(616)]=t[r(541)]();break;case 5:a[r(574)]=t[r(541)]();break;default:t[r(488)](7&c)}}return a},i[o(642)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(628)](t,t[n(588)]())},i[o(643)]=function(t){var e,n=o;return n(589)!=typeof t||null===t?n(655):null!=t[n(627)]&&t[n(552)](n(627))&&!r[n(490)](t[n(627)])?n(549):null!=t[n(582)]&&t[n(552)](n(582))&&(e=s[n(545)][n(643)](t[n(582)]))?n(522)+e:null!=t[n(532)]&&t[n(552)](n(532))&&(e=s[n(545)][n(643)](t[n(532)]))?n(635)+e:null!=t[n(616)]&&t[n(552)](n(616))&&n(530)!=typeof t[n(616)]?n(631):null!=t[n(574)]&&t[n(552)](n(574))&&n(530)!=typeof t[n(574)]?n(564):null},i[o(494)]=function(t){var e=o;if(t instanceof s[e(540)])return t;var n=new(s[e(540)]);if(null!=t[e(627)]&&(n[e(627)]=String(t[e(627)])),null!=t[e(582)]){if(e(589)!=typeof t[e(582)])throw TypeError(e(500));n[e(582)]=s[e(545)][e(494)](t[e(582)])}if(null!=t[e(532)]){if(e(589)!=typeof t[e(532)])throw TypeError(e(624));n[e(532)]=s[e(545)][e(494)](t[e(532)])}return null!=t[e(616)]&&(n[e(616)]=Boolean(t[e(616)])),null!=t[e(574)]&&(n[e(574)]=Boolean(t[e(574)])),n},i[o(609)]=function(t,e){var n=o;e||(e={});var r={};return e[n(587)]&&(r[n(627)]="",r[n(582)]=null,r[n(532)]=null,r[n(616)]=!1,r[n(574)]=!1),null!=t[n(627)]&&t[n(552)](n(627))&&(r[n(627)]=t[n(627)]),null!=t[n(582)]&&t[n(552)](n(582))&&(r[n(582)]=s[n(545)][n(609)](t[n(582)],e)),null!=t[n(532)]&&t[n(552)](n(532))&&(r[n(532)]=s[n(545)][n(609)](t[n(532)],e)),null!=t[n(616)]&&t[n(552)](n(616))&&(r[n(616)]=t[n(616)]),null!=t[n(574)]&&t[n(552)](n(574))&&(r[n(574)]=t[n(574)]),r},i[o(613)][o(509)]=function(){var t=o;return this[t(615)][t(609)](this,u[t(630)][t(527)])},i[o(555)]=function(t){var e=o;return void 0===t&&(t=e(519)),t+e(526)},i}(),s[t(520)]=function(){var o=t;function i(t){var e=yr;if(t)for(var n=Object[e(498)](t),r=0;r<n[e(562)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(613)][o(546)]=null,i[o(613)][o(542)]=null,i[o(613)][o(581)]=null,i[o(613)][o(621)]=0,i[o(613)][o(574)]=!1,i[o(531)]=function(t){return new i(t)},i[o(548)]=function(t,e){var r=o;return e||(e=n[r(531)]()),null!=t[r(546)]&&Object[r(552)][r(489)](t,r(546))&&s[r(517)][r(548)](t[r(546)],e[r(588)](10)[r(543)]())[r(577)](),null!=t[r(542)]&&Object[r(552)][r(489)](t,r(542))&&s[r(517)][r(548)](t[r(542)],e[r(588)](18)[r(543)]())[r(577)](),null!=t[r(581)]&&Object[r(552)][r(489)](t,r(581))&&s[r(517)][r(548)](t[r(581)],e[r(588)](26)[r(543)]())[r(577)](),null!=t[r(621)]&&Object[r(552)][r(489)](t,r(621))&&e[r(588)](32)[r(588)](t[r(621)]),null!=t[r(574)]&&Object[r(552)][r(489)](t,r(574))&&e[r(588)](40)[r(541)](t[r(574)]),e},i[o(533)]=function(t,e){var n=o;return this[n(548)](t,e)[n(577)]()},i[o(628)]=function(t,n){var r=o;t instanceof e||(t=e[r(531)](t));for(var i=void 0===n?t[r(516)]:t[r(515)]+n,a=new(s[r(520)]);t[r(515)]<i;){var c=t[r(588)]();switch(c>>>3){case 1:a[r(546)]=s[r(517)][r(628)](t,t[r(588)]());break;case 2:a[r(542)]=s[r(517)][r(628)](t,t[r(588)]());break;case 3:a[r(581)]=s[r(517)][r(628)](t,t[r(588)]());break;case 4:a[r(621)]=t[r(588)]();break;case 5:a[r(574)]=t[r(541)]();break;default:t[r(488)](7&c)}}return a},i[o(642)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(628)](t,t[n(588)]())},i[o(643)]=function(t){var e,n=o;return n(589)!=typeof t||null===t?n(655):null!=t[n(546)]&&t[n(552)](n(546))&&(e=s[n(517)][n(643)](t[n(546)]))?n(525)+e:null!=t[n(542)]&&t[n(552)](n(542))&&(e=s[n(517)][n(643)](t[n(542)]))?n(614)+e:null!=t[n(581)]&&t[n(552)](n(581))&&(e=s[n(517)][n(643)](t[n(581)]))?n(656)+e:null!=t[n(621)]&&t[n(552)](n(621))&&!r[n(539)](t[n(621)])?n(597):null!=t[n(574)]&&t[n(552)](n(574))&&n(530)!=typeof t[n(574)]?n(564):null},i[o(494)]=function(t){var e=o;if(t instanceof s[e(520)])return t;var n=new(s[e(520)]);if(null!=t[e(546)]){if(e(589)!=typeof t[e(546)])throw TypeError(e(660));n[e(546)]=s[e(517)][e(494)](t[e(546)])}if(null!=t[e(542)]){if(e(589)!=typeof t[e(542)])throw TypeError(e(505));n[e(542)]=s[e(517)][e(494)](t[e(542)])}if(null!=t[e(581)]){if(e(589)!=typeof t[e(581)])throw TypeError(e(596));n[e(581)]=s[e(517)][e(494)](t[e(581)])}return null!=t[e(621)]&&(n[e(621)]=t[e(621)]>>>0),null!=t[e(574)]&&(n[e(574)]=Boolean(t[e(574)])),n},i[o(609)]=function(t,e){var n=o;e||(e={});var r={};return e[n(587)]&&(r[n(546)]=null,r[n(542)]=null,r[n(581)]=null,r[n(621)]=0,r[n(574)]=!1),null!=t[n(546)]&&t[n(552)](n(546))&&(r[n(546)]=s[n(517)][n(609)](t[n(546)],e)),null!=t[n(542)]&&t[n(552)](n(542))&&(r[n(542)]=s[n(517)][n(609)](t[n(542)],e)),null!=t[n(581)]&&t[n(552)](n(581))&&(r[n(581)]=s[n(517)][n(609)](t[n(581)],e)),null!=t[n(621)]&&t[n(552)](n(621))&&(r[n(621)]=t[n(621)]),null!=t[n(574)]&&t[n(552)](n(574))&&(r[n(574)]=t[n(574)]),r},i[o(613)][o(509)]=function(){var t=o;return this[t(615)][t(609)](this,u[t(630)][t(527)])},i[o(555)]=function(t){var e=o;return void 0===t&&(t=e(519)),t+e(568)},i}(),s[t(583)]=function(){var o=t;function i(t){var e=yr;if(t)for(var n=Object[e(498)](t),r=0;r<n[e(562)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(613)][o(546)]=null,i[o(613)][o(621)]=0,i[o(613)][o(542)]=null,i[o(613)][o(574)]=!1,i[o(531)]=function(t){return new i(t)},i[o(548)]=function(t,e){var r=o;return e||(e=n[r(531)]()),null!=t[r(546)]&&Object[r(552)][r(489)](t,r(546))&&s[r(517)][r(548)](t[r(546)],e[r(588)](10)[r(543)]())[r(577)](),null!=t[r(621)]&&Object[r(552)][r(489)](t,r(621))&&e[r(588)](16)[r(588)](t[r(621)]),null!=t[r(542)]&&Object[r(552)][r(489)](t,r(542))&&s[r(517)][r(548)](t[r(542)],e[r(588)](26)[r(543)]())[r(577)](),null!=t[r(574)]&&Object[r(552)][r(489)](t,r(574))&&e[r(588)](32)[r(541)](t[r(574)]),e},i[o(533)]=function(t,e){var n=o;return this[n(548)](t,e)[n(577)]()},i[o(628)]=function(t,n){var r=o;t instanceof e||(t=e[r(531)](t));for(var i=void 0===n?t[r(516)]:t[r(515)]+n,a=new(s[r(583)]);t[r(515)]<i;){var c=t[r(588)]();switch(c>>>3){case 1:a[r(546)]=s[r(517)][r(628)](t,t[r(588)]());break;case 2:a[r(621)]=t[r(588)]();break;case 3:a[r(542)]=s[r(517)][r(628)](t,t[r(588)]());break;case 4:a[r(574)]=t[r(541)]();break;default:t[r(488)](7&c)}}return a},i[o(642)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(628)](t,t[n(588)]())},i[o(643)]=function(t){var e,n=o;return n(589)!=typeof t||null===t?n(655):null!=t[n(546)]&&t[n(552)](n(546))&&(e=s[n(517)][n(643)](t[n(546)]))?n(525)+e:null!=t[n(621)]&&t[n(552)](n(621))&&!r[n(539)](t[n(621)])?n(597):null!=t[n(542)]&&t[n(552)](n(542))&&(e=s[n(517)][n(643)](t[n(542)]))?n(614)+e:null!=t[n(574)]&&t[n(552)](n(574))&&n(530)!=typeof t[n(574)]?n(564):null},i[o(494)]=function(t){var e=o;if(t instanceof s[e(583)])return t;var n=new(s[e(583)]);if(null!=t[e(546)]){if(e(589)!=typeof t[e(546)])throw TypeError(e(605));n[e(546)]=s[e(517)][e(494)](t[e(546)])}if(null!=t[e(621)]&&(n[e(621)]=t[e(621)]>>>0),null!=t[e(542)]){if(e(589)!=typeof t[e(542)])throw TypeError(e(497));n[e(542)]=s[e(517)][e(494)](t[e(542)])}return null!=t[e(574)]&&(n[e(574)]=Boolean(t[e(574)])),n},i[o(609)]=function(t,e){var n=o;e||(e={});var r={};return e[n(587)]&&(r[n(546)]=null,r[n(621)]=0,r[n(542)]=null,r[n(574)]=!1),null!=t[n(546)]&&t[n(552)](n(546))&&(r[n(546)]=s[n(517)][n(609)](t[n(546)],e)),null!=t[n(621)]&&t[n(552)](n(621))&&(r[n(621)]=t[n(621)]),null!=t[n(542)]&&t[n(552)](n(542))&&(r[n(542)]=s[n(517)][n(609)](t[n(542)],e)),null!=t[n(574)]&&t[n(552)](n(574))&&(r[n(574)]=t[n(574)]),r},i[o(613)][o(509)]=function(){var t=o;return this[t(615)][t(609)](this,u[t(630)][t(527)])},i[o(555)]=function(t){var e=o;return void 0===t&&(t=e(519)),t+e(636)},i}(),s[t(511)]=function(){var o=t;function i(t){var e=yr;if(t)for(var n=Object[e(498)](t),r=0;r<n[e(562)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(613)][o(641)]=null,i[o(613)][o(633)]="",i[o(613)][o(502)]="",i[o(613)][o(574)]=!1,i[o(531)]=function(t){return new i(t)},i[o(548)]=function(t,e){var r=o;return e||(e=n[r(531)]()),null!=t[r(641)]&&Object[r(552)][r(489)](t,r(641))&&s[r(517)][r(548)](t[r(641)],e[r(588)](10)[r(543)]())[r(577)](),null!=t[r(633)]&&Object[r(552)][r(489)](t,r(633))&&e[r(588)](18)[r(535)](t[r(633)]),null!=t[r(502)]&&Object[r(552)][r(489)](t,r(502))&&e[r(588)](26)[r(535)](t[r(502)]),null!=t[r(574)]&&Object[r(552)][r(489)](t,r(574))&&e[r(588)](32)[r(541)](t[r(574)]),e},i[o(533)]=function(t,e){var n=o;return this[n(548)](t,e)[n(577)]()},i[o(628)]=function(t,n){var r=o;t instanceof e||(t=e[r(531)](t));for(var i=void 0===n?t[r(516)]:t[r(515)]+n,a=new(s[r(511)]);t[r(515)]<i;){var c=t[r(588)]();switch(c>>>3){case 1:a[r(641)]=s[r(517)][r(628)](t,t[r(588)]());break;case 2:a[r(633)]=t[r(535)]();break;case 3:a[r(502)]=t[r(535)]();break;case 4:a[r(574)]=t[r(541)]();break;default:t[r(488)](7&c)}}return a},i[o(642)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(628)](t,t[n(588)]())},i[o(643)]=function(t){var e=o;if(e(589)!=typeof t||null===t)return e(655);if(null!=t[e(641)]&&t[e(552)](e(641))){var n=s[e(517)][e(643)](t[e(641)]);if(n)return e(514)+n}return null!=t[e(633)]&&t[e(552)](e(633))&&!r[e(490)](t[e(633)])?e(561):null!=t[e(502)]&&t[e(552)](e(502))&&!r[e(490)](t[e(502)])?e(518):null!=t[e(574)]&&t[e(552)](e(574))&&e(530)!=typeof t[e(574)]?e(564):null},i[o(494)]=function(t){var e=o;if(t instanceof s[e(511)])return t;var n=new(s[e(511)]);if(null!=t[e(641)]){if(e(589)!=typeof t[e(641)])throw TypeError(e(578));n[e(641)]=s[e(517)][e(494)](t[e(641)])}return null!=t[e(633)]&&(n[e(633)]=String(t[e(633)])),null!=t[e(502)]&&(n[e(502)]=String(t[e(502)])),null!=t[e(574)]&&(n[e(574)]=Boolean(t[e(574)])),n},i[o(609)]=function(t,e){var n=o;e||(e={});var r={};return e[n(587)]&&(r[n(641)]=null,r[n(633)]="",r[n(502)]="",r[n(574)]=!1),null!=t[n(641)]&&t[n(552)](n(641))&&(r[n(641)]=s[n(517)][n(609)](t[n(641)],e)),null!=t[n(633)]&&t[n(552)](n(633))&&(r[n(633)]=t[n(633)]),null!=t[n(502)]&&t[n(552)](n(502))&&(r[n(502)]=t[n(502)]),null!=t[n(574)]&&t[n(552)](n(574))&&(r[n(574)]=t[n(574)]),r},i[o(613)][o(509)]=function(){var t=o;return this[t(615)][t(609)](this,u[t(630)][t(527)])},i[o(555)]=function(t){var e=o;return void 0===t&&(t=e(519)),t+e(513)},i}(),s[t(528)]=function(){var o=t;function i(t){var e=yr;if(t)for(var n=Object[e(498)](t),r=0;r<n[e(562)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(613)][o(576)]="",i[o(613)][o(612)]="",i[o(613)][o(611)]=!1,i[o(613)][o(580)]="",i[o(613)][o(639)]=!1,i[o(613)][o(601)]="",i[o(613)][o(574)]=!1,i[o(531)]=function(t){return new i(t)},i[o(548)]=function(t,e){var r=o;return e||(e=n[r(531)]()),null!=t[r(576)]&&Object[r(552)][r(489)](t,r(576))&&e[r(588)](10)[r(535)](t[r(576)]),null!=t[r(612)]&&Object[r(552)][r(489)](t,r(612))&&e[r(588)](18)[r(535)](t[r(612)]),null!=t[r(611)]&&Object[r(552)][r(489)](t,r(611))&&e[r(588)](24)[r(541)](t[r(611)]),null!=t[r(580)]&&Object[r(552)][r(489)](t,r(580))&&e[r(588)](34)[r(535)](t[r(580)]),null!=t[r(639)]&&Object[r(552)][r(489)](t,r(639))&&e[r(588)](40)[r(541)](t[r(639)]),null!=t[r(601)]&&Object[r(552)][r(489)](t,r(601))&&e[r(588)](50)[r(535)](t[r(601)]),null!=t[r(574)]&&Object[r(552)][r(489)](t,r(574))&&e[r(588)](56)[r(541)](t[r(574)]),e},i[o(533)]=function(t,e){var n=o;return this[n(548)](t,e)[n(577)]()},i[o(628)]=function(t,n){var r=o;t instanceof e||(t=e[r(531)](t));for(var i=void 0===n?t[r(516)]:t[r(515)]+n,a=new(s[r(528)]);t[r(515)]<i;){var c=t[r(588)]();switch(c>>>3){case 1:a[r(576)]=t[r(535)]();break;case 2:a[r(612)]=t[r(535)]();break;case 3:a[r(611)]=t[r(541)]();break;case 4:a[r(580)]=t[r(535)]();break;case 5:a[r(639)]=t[r(541)]();break;case 6:a[r(601)]=t[r(535)]();break;case 7:a[r(574)]=t[r(541)]();break;default:t[r(488)](7&c)}}return a},i[o(642)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(628)](t,t[n(588)]())},i[o(643)]=function(t){var e=o;return e(589)!=typeof t||null===t?e(655):null!=t[e(576)]&&t[e(552)](e(576))&&!r[e(490)](t[e(576)])?e(501):null!=t[e(612)]&&t[e(552)](e(612))&&!r[e(490)](t[e(612)])?e(510):null!=t[e(611)]&&t[e(552)](e(611))&&e(530)!=typeof t[e(611)]?e(632):null!=t[e(580)]&&t[e(552)](e(580))&&!r[e(490)](t[e(580)])?e(602):null!=t[e(639)]&&t[e(552)](e(639))&&e(530)!=typeof t[e(639)]?e(595):null!=t[e(601)]&&t[e(552)](e(601))&&!r[e(490)](t[e(601)])?e(647):null!=t[e(574)]&&t[e(552)](e(574))&&e(530)!=typeof t[e(574)]?e(564):null},i[o(494)]=function(t){var e=o;if(t instanceof s[e(528)])return t;var n=new(s[e(528)]);return null!=t[e(576)]&&(n[e(576)]=String(t[e(576)])),null!=t[e(612)]&&(n[e(612)]=String(t[e(612)])),null!=t[e(611)]&&(n[e(611)]=Boolean(t[e(611)])),null!=t[e(580)]&&(n[e(580)]=String(t[e(580)])),null!=t[e(639)]&&(n[e(639)]=Boolean(t[e(639)])),null!=t[e(601)]&&(n[e(601)]=String(t[e(601)])),null!=t[e(574)]&&(n[e(574)]=Boolean(t[e(574)])),n},i[o(609)]=function(t,e){var n=o;e||(e={});var r={};return e[n(587)]&&(r[n(576)]="",r[n(612)]="",r[n(611)]=!1,r[n(580)]="",r[n(639)]=!1,r[n(601)]="",r[n(574)]=!1),null!=t[n(576)]&&t[n(552)](n(576))&&(r[n(576)]=t[n(576)]),null!=t[n(612)]&&t[n(552)](n(612))&&(r[n(612)]=t[n(612)]),null!=t[n(611)]&&t[n(552)](n(611))&&(r[n(611)]=t[n(611)]),null!=t[n(580)]&&t[n(552)](n(580))&&(r[n(580)]=t[n(580)]),null!=t[n(639)]&&t[n(552)](n(639))&&(r[n(639)]=t[n(639)]),null!=t[n(601)]&&t[n(552)](n(601))&&(r[n(601)]=t[n(601)]),null!=t[n(574)]&&t[n(552)](n(574))&&(r[n(574)]=t[n(574)]),r},i[o(613)][o(509)]=function(){var t=o;return this[t(615)][t(609)](this,u[t(630)][t(527)])},i[o(555)]=function(t){var e=o;return void 0===t&&(t=e(519)),t+e(623)},i}(),s[t(598)]=function(){var o=t;function i(t){var e=yr;if(t)for(var n=Object[e(498)](t),r=0;r<n[e(562)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(613)][o(575)]="",i[o(613)][o(512)]="",i[o(613)][o(503)]=!1,i[o(613)][o(574)]=!1,i[o(531)]=function(t){return new i(t)},i[o(548)]=function(t,e){var r=o;return e||(e=n[r(531)]()),null!=t[r(575)]&&Object[r(552)][r(489)](t,r(575))&&e[r(588)](10)[r(535)](t[r(575)]),null!=t[r(512)]&&Object[r(552)][r(489)](t,r(512))&&e[r(588)](18)[r(535)](t[r(512)]),null!=t[r(503)]&&Object[r(552)][r(489)](t,r(503))&&e[r(588)](24)[r(541)](t[r(503)]),null!=t[r(574)]&&Object[r(552)][r(489)](t,r(574))&&e[r(588)](32)[r(541)](t[r(574)]),e},i[o(533)]=function(t,e){var n=o;return this[n(548)](t,e)[n(577)]()},i[o(628)]=function(t,n){var r=o;t instanceof e||(t=e[r(531)](t));for(var i=void 0===n?t[r(516)]:t[r(515)]+n,a=new(s[r(598)]);t[r(515)]<i;){var c=t[r(588)]();switch(c>>>3){case 1:a[r(575)]=t[r(535)]();break;case 2:a[r(512)]=t[r(535)]();break;case 3:a[r(503)]=t[r(541)]();break;case 4:a[r(574)]=t[r(541)]();break;default:t[r(488)](7&c)}}return a},i[o(642)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(628)](t,t[n(588)]())},i[o(643)]=function(t){var e=o;return e(589)!=typeof t||null===t?e(655):null!=t[e(575)]&&t[e(552)](e(575))&&!r[e(490)](t[e(575)])?e(557):null!=t[e(512)]&&t[e(552)](e(512))&&!r[e(490)](t[e(512)])?e(536):null!=t[e(503)]&&t[e(552)](e(503))&&e(530)!=typeof t[e(503)]?e(662):null!=t[e(574)]&&t[e(552)](e(574))&&e(530)!=typeof t[e(574)]?e(564):null},i[o(494)]=function(t){var e=o;if(t instanceof s[e(598)])return t;var n=new(s[e(598)]);return null!=t[e(575)]&&(n[e(575)]=String(t[e(575)])),null!=t[e(512)]&&(n[e(512)]=String(t[e(512)])),null!=t[e(503)]&&(n[e(503)]=Boolean(t[e(503)])),null!=t[e(574)]&&(n[e(574)]=Boolean(t[e(574)])),n},i[o(609)]=function(t,e){var n=o;e||(e={});var r={};return e[n(587)]&&(r[n(575)]="",r[n(512)]="",r[n(503)]=!1,r[n(574)]=!1),null!=t[n(575)]&&t[n(552)](n(575))&&(r[n(575)]=t[n(575)]),null!=t[n(512)]&&t[n(552)](n(512))&&(r[n(512)]=t[n(512)]),null!=t[n(503)]&&t[n(552)](n(503))&&(r[n(503)]=t[n(503)]),null!=t[n(574)]&&t[n(552)](n(574))&&(r[n(574)]=t[n(574)]),r},i[o(613)][o(509)]=function(){var t=o;return this[t(615)][t(609)](this,u[t(630)][t(527)])},i[o(555)]=function(t){var e=o;return void 0===t&&(t=e(519)),t+e(625)},i}(),s[t(506)]=function(){var o=t;function i(t){var e=yr;if(t)for(var n=Object[e(498)](t),r=0;r<n[e(562)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(613)][o(634)]=null,i[o(613)][o(581)]=null,i[o(613)][o(621)]=0,i[o(613)][o(551)]=null,i[o(613)][o(574)]=!1,i[o(531)]=function(t){return new i(t)},i[o(548)]=function(t,e){var r=o;return e||(e=n[r(531)]()),null!=t[r(634)]&&Object[r(552)][r(489)](t,r(634))&&s[r(517)][r(548)](t[r(634)],e[r(588)](10)[r(543)]())[r(577)](),null!=t[r(581)]&&Object[r(552)][r(489)](t,r(581))&&s[r(517)][r(548)](t[r(581)],e[r(588)](18)[r(543)]())[r(577)](),null!=t[r(621)]&&Object[r(552)][r(489)](t,r(621))&&e[r(588)](24)[r(588)](t[r(621)]),null!=t[r(551)]&&Object[r(552)][r(489)](t,r(551))&&s[r(517)][r(548)](t[r(551)],e[r(588)](34)[r(543)]())[r(577)](),null!=t[r(574)]&&Object[r(552)][r(489)](t,r(574))&&e[r(588)](40)[r(541)](t[r(574)]),e},i[o(533)]=function(t,e){var n=o;return this[n(548)](t,e)[n(577)]()},i[o(628)]=function(t,n){var r=o;t instanceof e||(t=e[r(531)](t));for(var i=void 0===n?t[r(516)]:t[r(515)]+n,a=new(s[r(506)]);t[r(515)]<i;){var c=t[r(588)]();switch(c>>>3){case 1:a[r(634)]=s[r(517)][r(628)](t,t[r(588)]());break;case 2:a[r(581)]=s[r(517)][r(628)](t,t[r(588)]());break;case 3:a[r(621)]=t[r(588)]();break;case 4:a[r(551)]=s[r(517)][r(628)](t,t[r(588)]());break;case 5:a[r(574)]=t[r(541)]();break;default:t[r(488)](7&c)}}return a},i[o(642)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(628)](t,t[n(588)]())},i[o(643)]=function(t){var e,n=o;return n(589)!=typeof t||null===t?n(655):null!=t[n(634)]&&t[n(552)](n(634))&&(e=s[n(517)][n(643)](t[n(634)]))?n(620)+e:null!=t[n(581)]&&t[n(552)](n(581))&&(e=s[n(517)][n(643)](t[n(581)]))?n(656)+e:null!=t[n(621)]&&t[n(552)](n(621))&&!r[n(539)](t[n(621)])?n(597):null!=t[n(551)]&&t[n(552)](n(551))&&(e=s[n(517)][n(643)](t[n(551)]))?n(508)+e:null!=t[n(574)]&&t[n(552)](n(574))&&n(530)!=typeof t[n(574)]?n(564):null},i[o(494)]=function(t){var e=o;if(t instanceof s[e(506)])return t;var n=new(s[e(506)]);if(null!=t[e(634)]){if(e(589)!=typeof t[e(634)])throw TypeError(e(659));n[e(634)]=s[e(517)][e(494)](t[e(634)])}if(null!=t[e(581)]){if(e(589)!=typeof t[e(581)])throw TypeError(e(572));n[e(581)]=s[e(517)][e(494)](t[e(581)])}if(null!=t[e(621)]&&(n[e(621)]=t[e(621)]>>>0),null!=t[e(551)]){if(e(589)!=typeof t[e(551)])throw TypeError(e(499));n[e(551)]=s[e(517)][e(494)](t[e(551)])}return null!=t[e(574)]&&(n[e(574)]=Boolean(t[e(574)])),n},i[o(609)]=function(t,e){var n=o;e||(e={});var r={};return e[n(587)]&&(r[n(634)]=null,r[n(581)]=null,r[n(621)]=0,r[n(551)]=null,r[n(574)]=!1),null!=t[n(634)]&&t[n(552)](n(634))&&(r[n(634)]=s[n(517)][n(609)](t[n(634)],e)),null!=t[n(581)]&&t[n(552)](n(581))&&(r[n(581)]=s[n(517)][n(609)](t[n(581)],e)),null!=t[n(621)]&&t[n(552)](n(621))&&(r[n(621)]=t[n(621)]),null!=t[n(551)]&&t[n(552)](n(551))&&(r[n(551)]=s[n(517)][n(609)](t[n(551)],e)),null!=t[n(574)]&&t[n(552)](n(574))&&(r[n(574)]=t[n(574)]),r},i[o(613)][o(509)]=function(){var t=o;return this[t(615)][t(609)](this,u[t(630)][t(527)])},i[o(555)]=function(t){var e=o;return void 0===t&&(t=e(519)),t+e(507)},i}(),s[t(517)]=function(){var o=t;function i(t){var e=yr;if(this[e(622)]=[],t)for(var n=Object[e(498)](t),r=0;r<n[e(562)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(613)][o(576)]="",i[o(613)][o(573)]=!1,i[o(613)][o(658)]=!1,i[o(613)][o(622)]=r[o(544)],i[o(613)][o(487)]="",i[o(531)]=function(t){return new i(t)},i[o(548)]=function(t,e){var r=o;if(e||(e=n[r(531)]()),null!=t[r(576)]&&Object[r(552)][r(489)](t,r(576))&&e[r(588)](10)[r(535)](t[r(576)]),null!=t[r(573)]&&Object[r(552)][r(489)](t,r(573))&&e[r(588)](16)[r(541)](t[r(573)]),null!=t[r(658)]&&Object[r(552)][r(489)](t,r(658))&&e[r(588)](24)[r(541)](t[r(658)]),null!=t[r(622)]&&t[r(622)][r(562)]){e[r(588)](34)[r(543)]();for(var s=0;s<t[r(622)][r(562)];++s)e[r(588)](t[r(622)][s]);e[r(577)]()}return null!=t[r(487)]&&Object[r(552)][r(489)](t,r(487))&&e[r(588)](42)[r(535)](t[r(487)]),e},i[o(533)]=function(t,e){var n=o;return this[n(548)](t,e)[n(577)]()},i[o(628)]=function(t,n){var r=o;t instanceof e||(t=e[r(531)](t));for(var i=void 0===n?t[r(516)]:t[r(515)]+n,a=new(s[r(517)]);t[r(515)]<i;){var c=t[r(588)]();switch(c>>>3){case 1:a[r(576)]=t[r(535)]();break;case 2:a[r(573)]=t[r(541)]();break;case 3:a[r(658)]=t[r(541)]();break;case 4:if(a[r(622)]&&a[r(622)][r(562)]||(a[r(622)]=[]),2==(7&c))for(var u=t[r(588)]()+t[r(515)];t[r(515)]<u;)a[r(622)][r(554)](t[r(588)]());else a[r(622)][r(554)](t[r(588)]());break;case 5:a[r(487)]=t[r(535)]();break;default:t[r(488)](7&c)}}return a},i[o(642)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(628)](t,t[n(588)]())},i[o(643)]=function(t){var e=o;if(e(589)!=typeof t||null===t)return e(655);if(null!=t[e(576)]&&t[e(552)](e(576))&&!r[e(490)](t[e(576)]))return e(501);if(null!=t[e(573)]&&t[e(552)](e(573))&&e(530)!=typeof t[e(573)])return e(594);if(null!=t[e(658)]&&t[e(552)](e(658))&&e(530)!=typeof t[e(658)])return e(606);if(null!=t[e(622)]&&t[e(552)](e(622))){if(!Array[e(592)](t[e(622)]))return e(646);for(var n=0;n<t[e(622)][e(562)];++n)if(!r[e(539)](t[e(622)][n]))return e(657)}return null!=t[e(487)]&&t[e(552)](e(487))&&!r[e(490)](t[e(487)])?e(650):null},i[o(494)]=function(t){var e=o;if(t instanceof s[e(517)])return t;var n=new(s[e(517)]);if(null!=t[e(576)]&&(n[e(576)]=String(t[e(576)])),null!=t[e(573)]&&(n[e(573)]=Boolean(t[e(573)])),null!=t[e(658)]&&(n[e(658)]=Boolean(t[e(658)])),t[e(622)]){if(!Array[e(592)](t[e(622)]))throw TypeError(e(560));n[e(622)]=[];for(var r=0;r<t[e(622)][e(562)];++r)n[e(622)][r]=t[e(622)][r]>>>0}return null!=t[e(487)]&&(n[e(487)]=String(t[e(487)])),n},i[o(609)]=function(t,e){var n=o;e||(e={});var r={};if((e[n(504)]||e[n(587)])&&(r[n(622)]=[]),e[n(587)]&&(r[n(576)]="",r[n(573)]=!1,r[n(658)]=!1,r[n(487)]=""),null!=t[n(576)]&&t[n(552)](n(576))&&(r[n(576)]=t[n(576)]),null!=t[n(573)]&&t[n(552)](n(573))&&(r[n(573)]=t[n(573)]),null!=t[n(658)]&&t[n(552)](n(658))&&(r[n(658)]=t[n(658)]),t[n(622)]&&t[n(622)][n(562)]){r[n(622)]=[];for(var s=0;s<t[n(622)][n(562)];++s)r[n(622)][s]=t[n(622)][s]}return null!=t[n(487)]&&t[n(552)](n(487))&&(r[n(487)]=t[n(487)]),r},i[o(613)][o(509)]=function(){var t=o;return this[t(615)][t(609)](this,u[t(630)][t(527)])},i[o(555)]=function(t){var e=o;return void 0===t&&(t=e(519)),t+e(590)},i}(),s[t(545)]=function(){var r=t;function o(t){var e=yr;if(t)for(var n=Object[e(498)](t),r=0;r<n[e(562)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return o[r(613)][r(640)]=null,o[r(613)][r(661)]=null,o[r(531)]=function(t){return new o(t)},o[r(548)]=function(t,e){var o=r;return e||(e=n[o(531)]()),null!=t[o(640)]&&Object[o(552)][o(489)](t,o(640))&&s[o(517)][o(548)](t[o(640)],e[o(588)](10)[o(543)]())[o(577)](),null!=t[o(661)]&&Object[o(552)][o(489)](t,o(661))&&s[o(517)][o(548)](t[o(661)],e[o(588)](18)[o(543)]())[o(577)](),e},o[r(533)]=function(t,e){var n=r;return this[n(548)](t,e)[n(577)]()},o[r(628)]=function(t,n){var o=r;t instanceof e||(t=e[o(531)](t));for(var i=void 0===n?t[o(516)]:t[o(515)]+n,a=new(s[o(545)]);t[o(515)]<i;){var c=t[o(588)]();switch(c>>>3){case 1:a[o(640)]=s[o(517)][o(628)](t,t[o(588)]());break;case 2:a[o(661)]=s[o(517)][o(628)](t,t[o(588)]());break;default:t[o(488)](7&c)}}return a},o[r(642)]=function(t){var n=r;return t instanceof e||(t=new e(t)),this[n(628)](t,t[n(588)]())},o[r(643)]=function(t){var e,n=r;return n(589)!=typeof t||null===t?n(655):null!=t[n(640)]&&t[n(552)](n(640))&&(e=s[n(517)][n(643)](t[n(640)]))?n(563)+e:null!=t[n(661)]&&t[n(552)](n(661))&&(e=s[n(517)][n(643)](t[n(661)]))?n(645)+e:null},o[r(494)]=function(t){var e=r;if(t instanceof s[e(545)])return t;var n=new(s[e(545)]);if(null!=t[e(640)]){if(e(589)!=typeof t[e(640)])throw TypeError(e(618));n[e(640)]=s[e(517)][e(494)](t[e(640)])}if(null!=t[e(661)]){if(e(589)!=typeof t[e(661)])throw TypeError(e(558));n[e(661)]=s[e(517)][e(494)](t[e(661)])}return n},o[r(609)]=function(t,e){var n=r;e||(e={});var o={};return e[n(587)]&&(o[n(640)]=null,o[n(661)]=null),null!=t[n(640)]&&t[n(552)](n(640))&&(o[n(640)]=s[n(517)][n(609)](t[n(640)],e)),null!=t[n(661)]&&t[n(552)](n(661))&&(o[n(661)]=s[n(517)][n(609)](t[n(661)],e)),o},o[r(613)][r(509)]=function(){var t=r;return this[t(615)][t(609)](this,u[t(630)][t(527)])},o[r(555)]=function(t){var e=r;return void 0===t&&(t=e(519)),t+e(569)},o}(),s[t(600)]=function(){var o=t;function i(t){var e=yr;if(this[e(626)]=[],this[e(649)]={},t)for(var n=Object[e(498)](t),r=0;r<n[e(562)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(613)][o(627)]="",i[o(613)][o(626)]=r[o(544)],i[o(613)][o(653)]="",i[o(613)][o(649)]=r[o(604)],i[o(613)][o(593)]="",i[o(531)]=function(t){return new i(t)},i[o(548)]=function(t,e){var r=o;if(e||(e=n[r(531)]()),null!=t[r(627)]&&Object[r(552)][r(489)](t,r(627))&&e[r(588)](10)[r(535)](t[r(627)]),null!=t[r(626)]&&t[r(626)][r(562)])for(var i=0;i<t[r(626)][r(562)];++i)s[r(600)][r(548)](t[r(626)][i],e[r(588)](18)[r(543)]())[r(577)]();if(null!=t[r(653)]&&Object[r(552)][r(489)](t,r(653))&&e[r(588)](26)[r(535)](t[r(653)]),null!=t[r(649)]&&Object[r(552)][r(489)](t,r(649))){var a=Object[r(498)](t[r(649)]);for(i=0;i<a[r(562)];++i)e[r(588)](34)[r(543)]()[r(588)](10)[r(535)](a[i])[r(588)](16)[r(541)](t[r(649)][a[i]])[r(577)]()}return null!=t[r(593)]&&Object[r(552)][r(489)](t,r(593))&&e[r(588)](42)[r(535)](t[r(593)]),e},i[o(533)]=function(t,e){var n=o;return this[n(548)](t,e)[n(577)]()},i[o(628)]=function(t,n){var i=o;t instanceof e||(t=e[i(531)](t));for(var a,c,u=void 0===n?t[i(516)]:t[i(515)]+n,d=new(s[i(600)]);t[i(515)]<u;){var l=t[i(588)]();switch(l>>>3){case 1:d[i(627)]=t[i(535)]();break;case 2:d[i(626)]&&d[i(626)][i(562)]||(d[i(626)]=[]),d[i(626)][i(554)](s[i(600)][i(628)](t,t[i(588)]()));break;case 3:d[i(653)]=t[i(535)]();break;case 4:d[i(649)]===r[i(604)]&&(d[i(649)]={});var p=t[i(588)]()+t[i(515)];for(a="",c=!1;t[i(515)]<p;){var h=t[i(588)]();switch(h>>>3){case 1:a=t[i(535)]();break;case 2:c=t[i(541)]();break;default:t[i(488)](7&h)}}d[i(649)][a]=c;break;case 5:d[i(593)]=t[i(535)]();break;default:t[i(488)](7&l)}}return d},i[o(642)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(628)](t,t[n(588)]())},i[o(643)]=function(t){var e=o;if(e(589)!=typeof t||null===t)return e(655);if(null!=t[e(627)]&&t[e(552)](e(627))&&!r[e(490)](t[e(627)]))return e(549);if(null!=t[e(626)]&&t[e(552)](e(626))){if(!Array[e(592)](t[e(626)]))return e(610);for(var n=0;n<t[e(626)][e(562)];++n){var i=s[e(600)][e(643)](t[e(626)][n]);if(i)return e(550)+i}}if(null!=t[e(653)]&&t[e(552)](e(653))&&!r[e(490)](t[e(653)]))return e(493);if(null!=t[e(649)]&&t[e(552)](e(649))){if(!r[e(591)](t[e(649)]))return e(603);var a=Object[e(498)](t[e(649)]);for(n=0;n<a[e(562)];++n)if(e(530)!=typeof t[e(649)][a[n]])return e(608)}return null!=t[e(593)]&&t[e(552)](e(593))&&!r[e(490)](t[e(593)])?e(547):null},i[o(494)]=function(t){var e=o;if(t instanceof s[e(600)])return t;var n=new(s[e(600)]);if(null!=t[e(627)]&&(n[e(627)]=String(t[e(627)])),t[e(626)]){if(!Array[e(592)](t[e(626)]))throw TypeError(e(652));n[e(626)]=[];for(var r=0;r<t[e(626)][e(562)];++r){if(e(589)!=typeof t[e(626)][r])throw TypeError(e(599));n[e(626)][r]=s[e(600)][e(494)](t[e(626)][r])}}if(null!=t[e(653)]&&(n[e(653)]=String(t[e(653)])),t[e(649)]){if(e(589)!=typeof t[e(649)])throw TypeError(e(637));n[e(649)]={};var i=Object[e(498)](t[e(649)]);for(r=0;r<i[e(562)];++r)n[e(649)][i[r]]=Boolean(t[e(649)][i[r]])}return null!=t[e(593)]&&(n[e(593)]=String(t[e(593)])),n},i[o(609)]=function(t,e){var n=o;e||(e={});var r,i={};if((e[n(504)]||e[n(587)])&&(i[n(626)]=[]),(e[n(585)]||e[n(587)])&&(i[n(649)]={}),e[n(587)]&&(i[n(627)]="",i[n(653)]="",i[n(593)]=""),null!=t[n(627)]&&t[n(552)](n(627))&&(i[n(627)]=t[n(627)]),t[n(626)]&&t[n(626)][n(562)]){i[n(626)]=[];for(var a=0;a<t[n(626)][n(562)];++a)i[n(626)][a]=s[n(600)][n(609)](t[n(626)][a],e)}if(null!=t[n(653)]&&t[n(552)](n(653))&&(i[n(653)]=t[n(653)]),t[n(649)]&&(r=Object[n(498)](t[n(649)]))[n(562)])for(i[n(649)]={},a=0;a<r[n(562)];++a)i[n(649)][r[a]]=t[n(649)][r[a]];return null!=t[n(593)]&&t[n(552)](n(593))&&(i[n(593)]=t[n(593)]),i},i[o(613)][o(509)]=function(){var t=o;return this[t(615)][t(609)](this,u[t(630)][t(527)])},i[o(555)]=function(t){var e=o;return void 0===t&&(t=e(519)),t+e(553)},i}(),s})();function br(){var t=["RootAttributeOperation","895027MTWVAo","boolean","create","newRange","encodeDelimited","shouldReceiveAttributes: boolean expected","string","elementName: string expected","Reader","nodes","isInteger","MarkerOperation","bool","targetPosition","fork","emptyArray","Range","sourcePosition","attributesJson: string expected","encode","name: string expected","children.","insertionPosition","hasOwnProperty","/Element","push","getTypeUrl",".InsertOperation.nodes: object expected","rootName: string expected",".Range.end: object expected","9lqnImj",".Position.path: array expected","oldName: string expected","length","start.","wasUndone: boolean expected","246VkamYP","40389YhSSSD","range.","/MergeOperation","/Range","nodes.","nodes: array expected",".SplitOperation.graveyardPosition: object expected","rootMain","wasUndone","rootName","root","ldelim",".RenameOperation.position: object expected","66dRSmjT","oldValueJson","graveyardPosition","oldRange","MoveOperation","24xALXRy","objects","2807655FLktld","defaults","uint32","object","/Position","isObject","isArray","attributesJson","rootMain: boolean expected","newValueBoolean: boolean expected",".MergeOperation.graveyardPosition: object expected","howMany: integer expected","RootOperation",".Element.children: object expected","Element","newValueJson","oldValueJson: string expected","attributesBoolean: object expected","emptyObject",".MoveOperation.sourcePosition: object expected","rootGraveyard: boolean expected","default","attributesBoolean: boolean{k:string} expected","toObject","children: array expected","oldValueBoolean","key","prototype","targetPosition.","constructor","affectsData","shouldReceiveAttributes",".Range.start: object expected","Writer","splitPosition.","howMany","path","/RootAttributeOperation",".MarkerOperation.newRange: object expected","/RootOperation","children","name","decode","7040708RoHLCs","util","affectsData: boolean expected","oldValueBoolean: boolean expected","oldName","splitPosition","newRange.","/MoveOperation",".Element.attributesBoolean: object expected",".AttributeOperation.range: object expected","newValueBoolean","start","position","decodeDelimited","verify","2577756ExLyWB","end.","path: array expected","newValueJson: string expected","AttributeOperation","attributesBoolean","stickiness: string expected","/InsertOperation",".Element.children: array expected","data","roots","object expected","graveyardPosition.","path: integer[] expected","rootGraveyard",".SplitOperation.splitPosition: object expected",".MergeOperation.sourcePosition: object expected","end","isAdd: boolean expected","/AttributeOperation","stickiness","skipType","call","isString",".InsertOperation.nodes: array expected","1661840qHBaUd","data: string expected","fromObject",".InsertOperation.position: object expected","250700zSYhnq",".MoveOperation.targetPosition: object expected","keys",".SplitOperation.insertionPosition: object expected",".MarkerOperation.oldRange: object expected","root: string expected","newName","isAdd","arrays",".MergeOperation.targetPosition: object expected","SplitOperation","/SplitOperation","insertionPosition.","toJSON","key: string expected","RenameOperation","elementName","/RenameOperation","position.","pos","len","Position","newName: string expected","type.googleapis.com","MergeOperation","12STcOEk","oldRange.","InsertOperation","range","sourcePosition.","/MarkerOperation","toJSONOptions"];return(br=function(){return t})()}const Ir=wr;function Or(){const t=["6083109eiBisj","verify","8746970RNTRJN","decompress","compress","28998oqNlVN","1QEaxEu","1514542UkjILQ","getDescriptor","_protobuf","7QmCWPo","220ZUQpFo","_protobufRoot","decode","3458682vpKHJm","finish","encode","8JIwzqw","4086745oJIlrh","27830462BiTXCo","toObject","create"];return(Or=function(){return t})()}!function(t){const e=wr,n=t();for(;;)try{if(711809===parseInt(e(170))/1*(-parseInt(e(171))/2)+-parseInt(e(169))/3*(-parseInt(e(175))/4)+-parseInt(e(160))/5+parseInt(e(156))/6*(-parseInt(e(174))/7)+-parseInt(e(159))/8*(-parseInt(e(164))/9)+-parseInt(e(166))/10+parseInt(e(161))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Or);class vr{[Ir(176)];constructor(){this[Ir(176)]=gr}[Ir(172)](t){return new Sr(this[Ir(176)][t])}}function wr(t,e){const n=Or();return(wr=function(t,e){return n[t-=156]})(t,e)}class Sr{[Ir(173)];constructor(t){this[Ir(173)]=t}[Ir(168)](t){const e=Ir,n=this[e(173)][e(165)](t);if(n)throw Error(n);return this[e(173)][e(158)](this[e(173)][e(163)](t))[e(157)]()}[Ir(167)](t){const e=Ir;return this[e(173)][e(162)](this[e(173)][e(177)](t),{oneofs:!0})}}function kr(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}function Ar(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const Tr="[object RegExp]",_r="[object String]",Cr="[object Number]",Pr="[object Boolean]",Er="[object Arguments]",jr="[object Symbol]",Dr="[object Date]",xr="[object Map]",Rr="[object Set]",Nr="[object Array]",Vr="[object ArrayBuffer]",Mr="[object Object]",Br="[object DataView]",Jr="[object Uint8Array]",Ur="[object Uint8ClampedArray]",qr="[object Uint16Array]",Lr="[object Uint32Array]",Gr="[object Int8Array]",Yr="[object Int16Array]",Hr="[object Int32Array]",zr="[object Float32Array]",Fr="[object Float64Array]";function Kr(t,e,n,r=new Map,s=void 0){const o=s?.(t,e,n,r);if(null!=o)return o;if(function(t){return null==t||"object"!=typeof t&&"function"!=typeof t}(t))return t;if(r.has(t))return r.get(t);if(Array.isArray(t)){const e=new Array(t.length);r.set(t,e);for(let o=0;o<t.length;o++)e[o]=Kr(t[o],o,n,r,s);return Object.hasOwn(t,"index")&&(e.index=t.index),Object.hasOwn(t,"input")&&(e.input=t.input),e}if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){const e=new RegExp(t.source,t.flags);return e.lastIndex=t.lastIndex,e}if(t instanceof Map){const e=new Map;r.set(t,e);for(const[o,i]of t)e.set(o,Kr(i,o,n,r,s));return e}if(t instanceof Set){const e=new Set;r.set(t,e);for(const o of t)e.add(Kr(o,void 0,n,r,s));return e}if("undefined"!=typeof Buffer&&Buffer.isBuffer(t))return t.subarray();if(function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(t)){const e=new(Object.getPrototypeOf(t).constructor)(t.length);r.set(t,e);for(let o=0;o<t.length;o++)e[o]=Kr(t[o],o,n,r,s);return e}if(t instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&t instanceof SharedArrayBuffer)return t.slice(0);if(t instanceof DataView){const e=new DataView(t.buffer.slice(0),t.byteOffset,t.byteLength);return r.set(t,e),Wr(e,t,n,r,s),e}if("undefined"!=typeof File&&t instanceof File){const e=new File([t],t.name,{type:t.type});return r.set(t,e),Wr(e,t,n,r,s),e}if(t instanceof Blob){const e=new Blob([t],{type:t.type});return r.set(t,e),Wr(e,t,n,r,s),e}if(t instanceof Error){const e=new t.constructor;return r.set(t,e),e.message=t.message,e.name=t.name,e.stack=t.stack,e.cause=t.cause,Wr(e,t,n,r,s),e}if("object"==typeof t&&function(t){switch(Ar(t)){case Er:case Nr:case Vr:case Br:case Pr:case Dr:case zr:case Fr:case Gr:case Yr:case Hr:case xr:case Cr:case Mr:case Tr:case Rr:case _r:case jr:case Jr:case Ur:case qr:case Lr:return!0;default:return!1}}(t)){const e=Object.create(Object.getPrototypeOf(t));return r.set(t,e),Wr(e,t,n,r,s),e}return t}function Wr(t,e,n=t,r,s){const o=[...Object.keys(e),...kr(e)];for(let i=0;i<o.length;i++){const a=o[i],c=Object.getOwnPropertyDescriptor(t,a);(null==c||c.writable)&&(t[a]=Kr(e[a],a,n,r,s))}}function Qr(t,e){return function(t,e){return Kr(t,void 0,t,new Map,e)}(t,(n,r,s,o)=>{const i=e?.(n,r,s,o);if(null!=i)return i;if("object"==typeof t)switch(Object.prototype.toString.call(t)){case Cr:case _r:case Pr:{const e=new t.constructor(t?.valueOf());return Wr(e,t),e}case Er:{const e={};return Wr(e,t),e.length=t.length,e[Symbol.iterator]=t[Symbol.iterator],e}default:return}})}function Zr(t){return Qr(t)}function Xr(t){if(!t||"object"!=typeof t)return!1;const e=Object.getPrototypeOf(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e))&&"[object Object]"===Object.prototype.toString.call(t)}function $r(t,e,n,r,s,o,i){const a=i(t,e,n,r,s,o);if(void 0!==a)return a;if(typeof t==typeof e)switch(typeof t){case"bigint":case"string":case"boolean":case"symbol":case"undefined":case"function":return t===e;case"number":return t===e||Object.is(t,e);case"object":return ts(t,e,o,i)}return ts(t,e,o,i)}function ts(t,e,n,r){if(Object.is(t,e))return!0;let s=Ar(t),o=Ar(e);if(s===Er&&(s=Mr),o===Er&&(o=Mr),s!==o)return!1;switch(s){case _r:return t.toString()===e.toString();case Cr:return function(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)}(t.valueOf(),e.valueOf());case Pr:case Dr:case jr:return Object.is(t.valueOf(),e.valueOf());case Tr:return t.source===e.source&&t.flags===e.flags;case"[object Function]":return t===e}const i=(n=n??new Map).get(t),a=n.get(e);if(null!=i&&null!=a)return i===e;n.set(t,e),n.set(e,t);try{switch(s){case xr:if(t.size!==e.size)return!1;for(const[s,o]of t.entries())if(!e.has(s)||!$r(o,e.get(s),s,t,e,n,r))return!1;return!0;case Rr:{if(t.size!==e.size)return!1;const s=Array.from(t.values()),o=Array.from(e.values());for(let i=0;i<s.length;i++){const a=s[i],c=o.findIndex(s=>$r(a,s,void 0,t,e,n,r));if(-1===c)return!1;o.splice(c,1)}return!0}case Nr:case Jr:case Ur:case qr:case Lr:case"[object BigUint64Array]":case Gr:case Yr:case Hr:case"[object BigInt64Array]":case zr:case Fr:if("undefined"!=typeof Buffer&&Buffer.isBuffer(t)!==Buffer.isBuffer(e))return!1;if(t.length!==e.length)return!1;for(let s=0;s<t.length;s++)if(!$r(t[s],e[s],s,t,e,n,r))return!1;return!0;case Vr:return t.byteLength===e.byteLength&&ts(new Uint8Array(t),new Uint8Array(e),n,r);case Br:return t.byteLength===e.byteLength&&t.byteOffset===e.byteOffset&&ts(new Uint8Array(t),new Uint8Array(e),n,r);case"[object Error]":return t.name===e.name&&t.message===e.message;case Mr:{if(!(ts(t.constructor,e.constructor,n,r)||Xr(t)&&Xr(e)))return!1;const s=[...Object.keys(t),...kr(t)],o=[...Object.keys(e),...kr(e)];if(s.length!==o.length)return!1;for(let o=0;o<s.length;o++){const i=s[o],a=t[i];if(!Object.hasOwn(e,i))return!1;if(!$r(a,e[i],i,t,e,n,r))return!1}return!0}default:return!1}}finally{n.delete(t),n.delete(e)}}function es(){}function ns(t,e){return function(t,e,n){return $r(t,e,void 0,void 0,void 0,void 0,n)}(t,e,es)}function rs(t){return null!==t&&("object"==typeof t||"function"==typeof t)}function ss(t,e){const n=is,r=Zr(t);return r[n(417)][r[n(417)][n(418)]-1]+=e,r}function os(t,e){const n=is;return t[n(408)]===e[n(408)]&&ns(t[n(417)],e[n(417)])}function is(t,e){const n=as();return(is=function(t,e){return n[t-=404]})(t,e)}function as(){const t=["nodes","143328kHZsQl","2824506BbeFwx","rootGraveyard","root","12EyOVHt","2222025KuKhRt","422358hOkPWA","rootMain","2321608tGSCFD","$graveyard","63EUgyWp","279138mLGxuZ","path","length","main","4836853zZIcLj"];return(as=function(){return t})()}function cs(t){const e=is;ds(t,t=>(e(419)==t[e(408)]?(t[e(412)]=!0,delete t[e(408)]):e(414)==t[e(408)]&&(t[e(407)]=!0,delete t[e(408)]),t))}function us(t){const e=is;ds(t,t=>(t[e(412)]?(t[e(408)]=e(419),delete t[e(412)]):t[e(407)]&&(t[e(408)]=e(414),delete t[e(407)]),t))}function ds(t,e){const n=is;for(const r in t){const s=t[r];n(404)!==r&&rs(s)&&(s[n(417)]&&(s[n(408)]||s[n(412)]||s[n(407)])?t[r]=e(s):ds(s,e))}return t}!function(t){const e=is,n=t();for(;;)try{if(369280===-parseInt(e(411))/1+parseInt(e(416))/2*(-parseInt(e(409))/3)+parseInt(e(405))/4+parseInt(e(410))/5+-parseInt(e(406))/6+-parseInt(e(420))/7+parseInt(e(413))/8*(parseInt(e(415))/9))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(as);const ls=ps;function ps(t,e){const n=hs();return(ps=function(t,e){return n[t-=168]})(t,e)}function hs(){const t=["41632iomDmH","shift","45hGhNcK","buffers","1742076wGhiON","1494922hCezLq","75513xNNcKU","_id","push","decompress","908862ciWqLL","types","_operationName","371520MzyVMI","10EkjbGb","7ORNNET","compress","__className","2ueUTiX","_protobufDescriptor","446298yfEQno"];return(hs=function(){return t})()}!function(t){const e=ps,n=t();for(;;)try{if(119550===-parseInt(e(171))/1+-parseInt(e(183))/2*(-parseInt(e(185))/3)+parseInt(e(186))/4*(parseInt(e(188))/5)+parseInt(e(175))/6*(-parseInt(e(180))/7)+parseInt(e(178))/8+parseInt(e(169))/9+parseInt(e(179))/10*(-parseInt(e(170))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(hs);class fs{[ls(172)];[ls(177)];[ls(184)];constructor(t,e,n){const r=ls;this[r(172)]=t,this[r(177)]=e,this[r(184)]=n}[ls(181)](t,e){const n=ls,r=e[n(187)]();return cs(r),t[n(168)][n(173)](this[n(184)][n(181)](r)),t[n(176)][n(173)](this[n(172)]),!0}[ls(174)](t,e){const n=ls;e[n(176)][n(187)]();const r=this[n(184)][n(174)](e[n(168)][n(187)]());us(r),r[n(182)]=this[n(177)],t[n(173)](r)}}function ms(t,e){const n=gs();return(ms=function(t,e){return n[t-=109]})(t,e)}const ys=ms;function gs(){const t=["boolean","6165936IzwoyL","stringify","_deserializeOneOf","524920VRueHF","3544056vlhYIt","1546PbMChP","buffers","_serializeOneOf","parse","902nTLCGF","newValue","63KGThet","Boolean","compress","148AfYMRm","_id","shift","141275NlkAJe","55AVMtTU","push","__className","decompress","Json","oldValue","_protobufDescriptor","types","_operationName","1724680MTyVYu","4565994fNHoiI"];return(gs=function(){return t})()}!function(t){const e=ms,n=t();for(;;)try{if(805155===parseInt(e(135))/1*(-parseInt(e(131))/2)+parseInt(e(130))/3+-parseInt(e(110))/4*(parseInt(e(113))/5)+-parseInt(e(124))/6+parseInt(e(126))/7+parseInt(e(123))/8*(parseInt(e(137))/9)+-parseInt(e(129))/10*(parseInt(e(114))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(gs);class bs extends fs{[ys(109)](t,e){const n=ys,r=e[n(112)]();return this[n(133)](n(119),r),this[n(133)](n(136),r),cs(r),t[n(132)][n(115)](this[n(120)][n(109)](r)),t[n(121)][n(115)](this[n(111)]),!0}[ys(117)](t,e){const n=ys,{types:r,buffers:s}=e,o=this[n(120)][n(117)](s[n(112)]());r[n(112)](),this[n(128)](n(119),o),this[n(128)](n(136),o),us(o),o[n(116)]=this[n(122)],t[n(115)](o)}[ys(133)](t,e){const n=ys,r=e[t];n(125)==typeof r?e[t+n(138)]=r:e[t+n(118)]=JSON[n(127)](r)}[ys(128)](t,e){const n=ys,r=t+n(118);e[r]?(e[t]=JSON[n(134)](e[r]),delete e[r]):(e[t]=e[t+n(138)],delete e[t+n(138)])}}const Is=vs;function Os(){const t=["compress","_serializeNodesAttributes","12yzFtbt","parse","every","attributes","426994ewLGvB","types","40740ajLsuk","_deserializeNodesAttributes","_id","_areValuesBoolean","keys","_operationName","nodes","attributesJson","_protobufDescriptor","__className","decompress","boolean","stringify","558965jCLPRx","904976tDkjNb","shift","attributesBoolean","115799HtzHao","push","children","buffers","2901115YJeFla","1020768ubEKqV"];return(Os=function(){return t})()}function vs(t,e){const n=Os();return(vs=function(t,e){return n[t-=244]})(t,e)}!function(t){const e=vs,n=t();for(;;)try{if(216297===-parseInt(e(266))/1+-parseInt(e(247))/2+-parseInt(e(249))/3+parseInt(e(271))/4+parseInt(e(262))/5*(-parseInt(e(274))/6)+parseInt(e(270))/7+parseInt(e(263))/8)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Os);class ws extends fs{[Is(272)](t,e){const n=Is,r=e[n(264)]();return this[n(273)](r[n(255)]),cs(r),t[n(269)][n(267)](this[n(257)][n(272)](r)),t[n(248)][n(267)](this[n(251)]),!0}[Is(259)](t,e){const n=Is,{types:r,buffers:s}=e,o=this[n(257)][n(259)](s[n(264)]());r[n(264)](),o[n(255)]||(o[n(255)]=[]),this[n(250)](o[n(255)]),us(o),o[n(258)]=this[n(254)],t[n(267)](o)}[Is(273)](t){const e=Is;for(const n of t){if(n[e(246)]){const t=n[e(246)];this[e(252)](t)?n[e(265)]=t:n[e(256)]=JSON[e(261)](t)}n[e(268)]&&this[e(273)](n[e(268)])}}[Is(250)](t){const e=Is;for(const n of t)(n[e(265)]||n[e(256)])&&(n[e(265)]?(n[e(246)]=n[e(265)],delete n[e(265)]):(n[e(246)]=JSON[e(244)](n[e(256)]),delete n[e(256)])),n[e(268)]&&this[e(250)](n[e(268)])}[Is(252)](t){const e=Is;return Object[e(253)](t)[e(245)](n=>e(260)==typeof t[n])}}const Ss=As;function ks(){const t=["length","oldRange","36449AOLHrV","13422JRyDhS","2430tUfTcW","3463260VEdULI","198yRPOgG","decompress","869295ZfarSw","1014Iizwbi","newRange","86NmJUSQ","262768wBzaae","1976256ZKexQW","195459AZKIkO"];return(ks=function(){return t})()}function As(t,e){const n=ks();return(As=function(t,e){return n[t-=443]})(t,e)}!function(t){const e=As,n=t();for(;;)try{if(466879===-parseInt(e(448))/1+parseInt(e(451))/2*(-parseInt(e(443))/3)+-parseInt(e(453))/4+-parseInt(e(445))/5+-parseInt(e(449))/6*(parseInt(e(457))/7)+-parseInt(e(452))/8*(parseInt(e(446))/9)+-parseInt(e(444))/10*(-parseInt(e(454))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ks);class Ts extends fs{[Ss(447)](t,e){const n=Ss;super[n(447)](t,e);const r=t[t[n(455)]-1];r[n(456)]||(r[n(456)]=null),r[n(450)]||(r[n(450)]=null)}}var _s=Ps;function Cs(){var t=["7685ykPtho","decompress","types","_operationName","1621532FEJXga","_id","243AtWFMT","492OzLHZQ","shift","15504AHDgpE","180793KFxtXI","3950580OcKdTp","3032274BZsqIE","push","1717464Gpczgs","compress"];return(Cs=function(){return t})()}function Ps(t,e){var n=Cs();return(Ps=function(t,e){return n[t-=238]})(t,e)}!function(t){for(var e=Ps,n=t();;)try{if(735836===-parseInt(e(246))/1+parseInt(e(240))/2+parseInt(e(250))/3+-parseInt(e(243))/4*(parseInt(e(252))/5)+-parseInt(e(247))/6+parseInt(e(248))/7+parseInt(e(245))/8*(-parseInt(e(242))/9))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Cs);class Es extends fs{[_s(251)](t,e){var n=_s;return e[n(244)](),t[n(238)][n(249)](this[n(241)]),!0}[_s(253)](t,e){var n=_s;e[n(238)][n(244)](),t[n(249)]({__className:this[n(239)]})}}const js=xs;function Ds(){const t=["22tyPBrQ","replace","101370uzFnHg","9wQLlAl","1870EyjckZ","compress","__className","name","4309753wGAYoL","34660oVjNEr","_omittedNamespace","306qmHOYH","decompress","21795vdWFwl","length","startsWith","366nsaTyl","8VMPwkR","MarkerOperation","714168phAtUz","1553776PrBQUv"];return(Ds=function(){return t})()}function xs(t,e){const n=Ds();return(xs=function(t,e){return n[t-=116]})(t,e)}!function(t){const e=xs,n=t();for(;;)try{if(843801===parseInt(e(128))/1+parseInt(e(123))/2*(parseInt(e(122))/3)+parseInt(e(118))/4+parseInt(e(132))/5*(parseInt(e(135))/6)+-parseInt(e(127))/7*(-parseInt(e(136))/8)+-parseInt(e(130))/9*(parseInt(e(121))/10)+parseInt(e(119))/11*(-parseInt(e(117))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ds);class Rs extends Ts{[js(129)];constructor(t,e,n,r){const s=js;super(t,e,n),this[s(129)]=r+":"}[js(124)](t,e){const n=js;return!(n(116)!=e[0][n(125)]||!e[0][n(126)][n(134)](this[n(129)])||(e[0][n(126)]=e[0][n(126)][n(120)](new RegExp("^"+this[n(129)]),""),super[n(124)](t,e),0))}[js(131)](t,e){const n=js;super[n(131)](t,e);const r=t[t[n(133)]-1];r[n(126)]=this[n(129)]+r[n(126)]}}function Ns(t,e){const n=Bs();return(Ns=function(t,e){return n[t-=267]})(t,e)}const Vs=Ns;!function(t){const e=Ns,n=t();for(;;)try{if(165028===-parseInt(e(289))/1+-parseInt(e(280))/2+-parseInt(e(275))/3*(parseInt(e(285))/4)+parseInt(e(278))/5*(-parseInt(e(272))/6)+-parseInt(e(271))/7+-parseInt(e(286))/8+parseInt(e(274))/9*(parseInt(e(290))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Bs);class Ms{[Vs(284)];[Vs(276)];constructor(t,e){const n=Vs;this[n(284)]=t,this[n(276)]=e}[Vs(279)](t,e){const n=Vs;let r;for(;e[n(287)]>1&&this[n(273)](e[0],e[1]);)r?(r=this[n(282)](e[n(283)](),r),t[n(269)][n(267)](0)):(r=Zr(e[n(283)]()),t[n(269)][n(267)](this[n(284)]));return!!r&&(r=this[n(282)](e[n(283)](),r),t[n(269)][n(267)](0),t[n(281)][n(267)](this[n(277)](r)),!0)}[Vs(270)](t,e){const n=Vs,r=this[n(268)](e);for(;0==e[n(269)][0];)e[n(269)][n(283)](),t[n(267)](this[n(288)](r));t[n(267)](r)}}function Bs(){const t=["_decompressSingleOperation","types","decompress","1631595ocPsaP","187062ILlICg","_compareOperations","9434457vGCWPH","15goynrf","_context","_compressSingleOperation","40FtOLbW","compress","382570bEtgEk","buffers","_combineNext","shift","_id","1684UIbZqz","626560teOlXs","length","_splitCurrent","129034iEXklE","10jxrWTU","push"];return(Bs=function(){return t})()}const Js=qs;function Us(){const t=["_compareAttributes","_getCompressorByName","length","from","compress","_splitCurrent","_context","80OAcBpw","nodes","_decompressSingleOperation","1306908tXoBVD","348180nlKOGm","5015352DpRXas","_compressSingleOperation","value","every","49656apwRty","70744QAdZue","230sErjhN","__className","data","6lGoSle","keys","wasUndone","attributes","next","position","buffers","InsertOperation","iterator","_combineNext","substr","decompress","_compareOperations","9697110KDzFlm","5941691UIWIBv","_checkOperation"];return(Us=function(){return t})()}function qs(t,e){const n=Us();return(qs=function(t,e){return n[t-=154]})(t,e)}!function(t){const e=qs,n=t();for(;;)try{if(454529===-parseInt(e(180))/1+parseInt(e(176))/2*(-parseInt(e(185))/3)+parseInt(e(186))/4*(parseInt(e(187))/5)+-parseInt(e(190))/6*(-parseInt(e(167))/7)+parseInt(e(181))/8+parseInt(e(179))/9+-parseInt(e(166))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Us);class Ls extends Ms{[Js(162)](t,e){const n=Js;return e[n(177)][0][n(189)]+=t[n(177)][0][n(189)],e}[Js(174)](t){const e=Js,n=Zr(t),r=n[e(177)][0],s=t[e(177)][0],o=s[e(189)][Symbol[e(161)]]()[e(157)]()[e(183)],i=o[e(171)];return r[e(189)]=o,s[e(189)]=s[e(189)][e(163)](i),t[e(158)]=ss(t[e(158)],i),n}[Js(165)](t,e){const n=Js;if(this[n(168)](t)&&this[n(168)](e)){const r=t[n(177)][0][n(189)][n(171)],s=os(ss(t[n(158)],r),e[n(158)]),o=t[n(177)][0],i=e[n(177)][0];return s&&this[n(169)](o,i)}return!1}[Js(182)](t){const e=Js,n={types:[],buffers:[],baseVersion:0};return this[e(175)][e(170)](e(160))[e(173)](n,[t]),n[e(159)][0]}[Js(178)](t){const e=Js,n=[];return this[e(175)][e(170)](e(160))[e(164)](n,t),n[0]}[Js(168)](t){const e=Js;return e(160)==t[e(188)]&&1==t[e(177)][e(171)]&&t[e(177)][0][e(189)]&&!t[e(155)]&&1==Array[e(172)](t[e(177)][0][e(189)])[e(171)]}[Js(169)](t,e){const n=Js,r=Object[n(154)](t[n(156)]||{}),s=Object[n(154)](e[n(156)]||{});return r[n(171)]===s[n(171)]&&r[n(184)](r=>e[n(156)][r]&&e[n(156)][r]===t[n(156)][r])}}const Gs=Ys;function Ys(t,e){const n=zs();return(Ys=function(t,e){return n[t-=274]})(t,e)}!function(t){const e=Ys,n=t();for(;;)try{if(176838===parseInt(e(290))/1*(parseInt(e(276))/2)+-parseInt(e(288))/3+parseInt(e(285))/4*(-parseInt(e(277))/5)+parseInt(e(274))/6*(parseInt(e(286))/7)+-parseInt(e(299))/8*(-parseInt(e(298))/9)+-parseInt(e(300))/10+-parseInt(e(302))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(zs);class Hs extends Ms{[Gs(289)](t,e){const n=Gs;return e[n(281)]++,e[n(291)]=Zr(t[n(291)]),e}[Gs(287)](t){const e=Gs,n=Zr(t);return t[e(281)]--,n[e(281)]=1,n[e(291)]=ss(n[e(291)],t[e(281)]),n}[Gs(297)](t,e){const n=Gs;return!(!this[n(303)](t)||!this[n(303)](e))&&os(ss(t[n(291)],-1),e[n(291)])&&os(t[n(295)],e[n(295)])}[Gs(280)](t){const e=Gs,n={types:[],buffers:[],baseVersion:0};return this[e(296)][e(283)](e(301))[e(293)](n,[t]),n[e(284)][0]}[Gs(294)](t){const e=Gs,n=[];return this[e(296)][e(283)](e(301))[e(279)](n,t),n[0]}[Gs(303)](t){const e=Gs;return e(301)==t[e(278)]&&e(292)==t[e(295)][e(282)]&&1==t[e(281)]&&!t[e(275)]}}function zs(){const t=["_getCompressorByName","buffers","12808RuykOw","2168467ZkiQhR","_splitCurrent","238374tZkxIG","_combineNext","1lbvGHl","sourcePosition","$graveyard","compress","_decompressSingleOperation","targetPosition","_context","_compareOperations","18tVDlNE","912480CUBfRH","601780NHrkGM","MoveOperation","2805341AJDOfR","_checkOperation","6BIVHYN","wasUndone","105632ZOzxMp","30thdcDb","__className","decompress","_compressSingleOperation","howMany","root"];return(zs=function(){return t})()}const Fs=Ks;function Ks(t,e){const n=Ws();return(Ks=function(t,e){return n[t-=469]})(t,e)}function Ws(){const t=["1359DaIPnb","root","2567592Ymxboc","_compareOperations","315VXpbpN","buffers","$graveyard","199878muAftL","howMany","_splitCurrent","1nWcBev","MoveOperation","1741680BJExRU","_checkOperation","36252udFctt","_combineNext","_decompressSingleOperation","_context","_getCompressorByName","targetPosition","30065bSdIQE","decompress","wasUndone","72112JtFzkv","sourcePosition","__className","_compressSingleOperation","compress","1498609PzeKWD"];return(Ws=function(){return t})()}!function(t){const e=Ks,n=t();for(;;)try{if(703586===-parseInt(e(469))/1*(parseInt(e(495))/2)+parseInt(e(492))/3*(-parseInt(e(473))/4)+parseInt(e(479))/5+parseInt(e(490))/6+-parseInt(e(487))/7+-parseInt(e(482))/8*(-parseInt(e(488))/9)+parseInt(e(471))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ws);class Qs extends Ms{[Fs(474)](t,e){return e[Fs(496)]++,e}[Fs(497)](t){const e=Fs,n=Zr(t);return n[e(496)]=1,t[e(496)]--,n}[Fs(491)](t,e){const n=Fs;return!(!this[n(472)](t)||!this[n(472)](e))&&os(t[n(483)],e[n(483)])&&os(t[n(478)],e[n(478)])}[Fs(485)](t){const e=Fs,n={types:[],buffers:[],baseVersion:0};return this[e(476)][e(477)](e(470))[e(486)](n,[t]),n[e(493)][0]}[Fs(475)](t){const e=Fs,n=[];return this[e(476)][e(477)](e(470))[e(480)](n,t),n[0]}[Fs(472)](t){const e=Fs;return e(470)==t[e(484)]&&e(494)==t[e(478)][e(489)]&&1==t[e(496)]&&!t[e(481)]}}const Zs=Xs;function Xs(t,e){const n=$s();return(Xs=function(t,e){return n[t-=239]})(t,e)}function $s(){const t=["start","oldRange","split","5424280ycuufx","286024XABlQA","shift","_decompressSingleOperation","_id","user:","push","7bKIECr","name","startsWith","types","5pKjsPQ","compress","toNone","_compressSingleOperation","newRange","45ruvqfD","2311638VQJsjb","2934972lXRvRv","end","stickiness","_context","725171oVAeik","buffers","898632mZWFLI","_getCompressorByName","decompress","_compareOperations","user:position:","MarkerOperation","1621292kxGuSq","__className"];return($s=function(){return t})()}!function(t){const e=Xs,n=t();for(;;)try{if(515579===parseInt(e(265))/1+-parseInt(e(267))/2+parseInt(e(260))/3+parseInt(e(273))/4*(-parseInt(e(254))/5)+parseInt(e(261))/6*(-parseInt(e(250))/7)+-parseInt(e(244))/8*(parseInt(e(259))/9)+parseInt(e(243))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}($s);class to extends Ms{[Zs(255)](t,e){const n=Zs;if(!this[n(270)](e[0],e[1]))return!1;const r=e[n(245)]();return r[n(241)]=null,r[n(258)]&&os(r[n(258)][n(240)],r[n(258)][n(262)])&&(r[n(258)][n(262)]=null),e[n(245)](),t[n(253)][n(249)](this[n(247)]),t[n(253)][n(249)](0),t[n(266)][n(249)](this[n(257)](r)),!0}[Zs(269)](t,e){const n=Zs,r=this[n(246)](e);r[n(258)]&&!r[n(258)][n(262)]&&(r[n(258)][n(262)]=Zr(r[n(258)][n(240)]));const s=Zr(r);s[n(258)]&&(s[n(258)][n(240)][n(263)]=n(256),s[n(258)][n(262)]=Zr(s[n(258)][n(240)])),s[n(251)]=n(271)+s[n(251)][n(242)](":")[2],e[n(253)][n(245)](),t[n(249)](r),t[n(249)](s)}[Zs(257)](t){const e=Zs,n={types:[],buffers:[],baseVersion:0};return this[e(264)][e(268)](e(272))[e(255)](n,[t]),n[e(266)][0]}[Zs(246)](t){const e=Zs,n=[];return this[e(264)][e(268)](e(272))[e(269)](n,t),n[0]}[Zs(270)](t,e){const n=Zs;return!!(t&&e&&n(272)==t[n(239)]&&n(272)==e[n(239)]&&t[n(251)][n(252)](n(248))&&e[n(251)][n(252)](n(248))&&t[n(251)]!=e[n(251)])}}const eo=no;function no(t,e){const n=ro();return(no=function(t,e){return n[t-=167]})(t,e)}function ro(){const t=["_compressorById","decompress","RootOperation","_registerActionCompressor","__className","decompress-compressor-not-found","449336mUvGCp","suggestion","types","TypingAction","1302882qxwaKR","InsertOperation","baseVersion","ForwardDeletingAction","getDescriptor","RootAttributeOperation","CommentMarkerOperation","RenameOperation","no-operations-provided","13542298dJSUVc","_protobufFactory","12BRrVWh","_getCompressorByName","set","3848fSOgdi","AttributeOperation","87382EuLAqg","SplitOperation","UserSelectionAction","DeletingAction","824765mEPDVR","_registerOperationCompressor","MarkerOperation","length","compress","10940pLiZCd","get","_compressorByName","63IysiYo","2LBcqpJ","forEach","NoOperation","comment","MoveOperation","329hLvlBS","SuggestionMarkerOperation","_registerCompressor","MergeOperation"];return(ro=function(){return t})()}!function(t){const e=no,n=t();for(;;)try{if(252253===parseInt(e(203))/1*(-parseInt(e(168))/2)+-parseInt(e(187))/3+-parseInt(e(183))/4+-parseInt(e(207))/5*(parseInt(e(198))/6)+parseInt(e(173))/7*(-parseInt(e(201))/8)+-parseInt(e(167))/9*(-parseInt(e(212))/10)+parseInt(e(196))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ro);class so{[eo(177)];[eo(214)];[eo(197)];constructor(){const t=eo;this[t(177)]=new Map,this[t(214)]=new Map,this[t(197)]=new vr;const e=this[t(197)][t(191)](t(209));this[t(175)](1,t(170),new Es(1,t(170),void 0)),this[t(208)](10,t(202),bs),this[t(208)](11,t(188),ws),this[t(208)](12,t(209),Ts),this[t(208)](13,t(176),fs),this[t(208)](14,t(172),fs),this[t(208)](15,t(194),fs),this[t(208)](16,t(192),bs),this[t(208)](17,t(204),fs),this[t(175)](18,t(193),new Rs(18,t(209),e,t(171))),this[t(175)](19,t(174),new Rs(19,t(209),e,t(184))),this[t(208)](20,t(179),fs),this[t(180)](100,t(186),Ls),this[t(180)](101,t(206),Hs),this[t(180)](102,t(190),Qs),this[t(180)](103,t(205),to)}[eo(211)](t){const e=eo;if(!t||!t[0])throw new n.CKEditorError(e(195),this);const r={types:[],buffers:[],baseVersion:t[0][e(189)]};for(;t[e(210)];)this[e(199)](e(205))[e(211)](r,t)||this[e(199)](e(186))[e(211)](r,t)||this[e(199)](e(206))[e(211)](r,t)||this[e(199)](e(190))[e(211)](r,t)||this[e(199)](e(193))[e(211)](r,t)||this[e(199)](e(174))[e(211)](r,t)||this[e(199)](t[0][e(181)])[e(211)](r,t);return r}[eo(178)](t){const e=eo,r=[];for(;t[e(185)][e(210)];){const s=this[e(177)][e(213)](t[e(185)][0]);if(!s)throw new n.CKEditorError(e(182),this,{type:t[e(185)][0]});s[e(178)](r,t)}return r[e(169)]((n,r)=>n[e(189)]=t[e(189)]+r),r}[eo(199)](t){const e=eo;return this[e(214)][e(213)](t)}[eo(208)](t,e,n){const r=eo,s=new n(t,e,this[r(197)][r(191)](e));this[r(175)](t,e,s)}[eo(180)](t,e,n){const r=eo,s=new n(t,this);this[r(175)](t,e,s)}[eo(175)](t,e,n){const r=eo;this[r(177)][r(200)](t,n),this[r(214)][r(200)](e,n)}}function oo(t,e){var n=io();return(oo=function(t,e){return n[t-=135]})(t,e)}function io(){var t=["216897KtkMJl","1314kvgGTi","825632ZPUFfU","33429BUSHEN","3jxnwEl","122316YWTuHh","35NZQyPn","312572Qfdfso","5MWqPvd","70ICxCPQ","26owIbWs","1336092nWNmsE","4184wtIkJW"];return(io=function(){return t})()}!function(t){for(var e=oo,n=t();;)try{if(143654===parseInt(e(144))/1+parseInt(e(138))/2*(parseInt(e(135))/3)+parseInt(e(146))/4*(-parseInt(e(139))/5)+parseInt(e(136))/6*(parseInt(e(137))/7)+-parseInt(e(143))/8*(-parseInt(e(145))/9)+parseInt(e(140))/10*(parseInt(e(147))/11)+-parseInt(e(142))/12*(parseInt(e(141))/13))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(io);const ao=uo;function co(){const t=["cloudDocumentVersion","get","forEach","data","_isAttached","sessionAdd:","rootsAttributes","_loadRoot","realtimecollaborationclient-init-connection-failed","sendOperations","removeFromReconnectionStack","affectsData","_updateServerHistory","pluginName","_getOperationsFromInitData","2466528VnjAED","rtc-destroyed","_channelId","affectedSelectable","PENDING_ACTION_SENDING_DATA","disableReadOnlyMode","getDocumentDetails","_handleSendingSelectionMarkers","_refreshUserSelectionMarkers","type","_bufferRootLoad","connection","requires","_setUpDataInit","getRoot","disconnect","round","isOfficialPlugin","realtimecollaborationclient","wasUndone","_addKnownRoot","_clearPendingAction","_disconnectService","getOperations","directChange","path","from","_pendingAction","change:hasDomSelection","realtimecollaborationclient-init-session-connection-error","remove","cloud-services-internal-error: Not connected.","getUser","clone","wereChangesApplied","add","_disconnectionOperations","_isEditingAllowed","view","history","parse","_handleReconnectionError","Permissions","_handleInitialConnectionData","_initSessionsHandling","InsertOperation","define","newRange","code","addToReconnectionStack","CollaborativeEditingService","initData","createUserMarkerOperations","message","applyOperation","apply","loadRoot","addRootAttribute","44883GBjAKj","multi-root-editor-root-attributes-no-root","end","off","_operationIdentifier","_isInit","CommentsOnly","startsWith","init","editing","Synchronization issue","isDocumentOperation","insert","locale","_isLoaded","__className","cloud-services-internal-error: Collaborative Editing Service is not connected.","realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration","addOperation","listenTo","sessionId","_initThrowingOnDataSet","75qwHPff","realtimecollaborationclient-error","realtimecollaborationclient-init-non-existent-root","move","createPositionFromPath","reconnect","fire","real-time-collaboration","collaboration","stop","The local document and server document differ and merging them can cause unexpected behavior. To not lose your content save it locally and refresh the editor.","getMany","_lastServerVersion","_connectService","reset","realtimecollaborationclient-sendbufferedoperations","ready","return","push","document:write","connected","batch","realtimecollaborationclient-init-document-already-initialized","_sendBufferedOperations","has","operationsReceived","model","rtc-offline","_service","finally","metadata","_hasSelectionChanged","_handleExternalOperations","version","cloudServices.bundleVersion","_authorId","collaboration.channelId","_fetchMissingUsers","getConnectedSessions","_isConnected","The last saved version of the document does not match the local version. To not lose your content save it locally and refresh the editor.","sessionCreatedAt","createRoot","channelSessions","toJSON","stopListening","addUser","lastDocumentSession","connect","611576GfZemu","_applyOperationsSet","cs:removeUser","state","1641186FCDPYx","_lastSyncedOperationId","setIdForTheLastOperation","bind","cloud-services-internal-error: Request timeout.","_currentBufferDelay","3kzPUUZ","root","getIdOfTheLastOperation","compress","lastOperationId","RealTimeCollaborationClient","realtimecollaborationclient-init-service-internal-error","differ","plugins","enableReadOnlyMode","includes","enqueueChange","error","isUndoneOperation","editor","_waitUntilSynced","realtimecollaborationclient-init-service-incorrect-server-operation","_shouldSendUpdate","_crash","then","setPermissions","targetPosition","5030TCKvgh","_decompressOperations","409","_hasSynchronizationProblem","reconnection: flushed session","entries","_isPendingUpdate","_sendBufferedOperationsDelayId","_compressOperations","string","serverHistory","baseVersion","getOperationAuthor","change:range","catch","showWarning","_compressor","addRoot","$root","_getAffectedRoot","lastSyncVersion","permissions","The document cannot be connected back to the server. To not lose your content save it locally and refresh the editor.","_document","userId","realtimecollaborationclient-handleserverresponse","position","suppressErrorInCollaboration","slice","markers","_isDisconnection","high","mySessionId","selection","map","3348552cSBsdt","lastOperationAcceptedAt","isEnabled","disconnected","attributes","_knownOperations","The document details could not be taken during the reconnection. To not lose your content save it locally and refresh the editor.","start","register","_connectAfterSessionHasBeenFlushed","set","createRange","Notification","_setPendingAction","size","fromJSON","filter","createPositionAt","_offset","404","_ignoredOperations","destroy","_saveOperationInBuffer","change:_isEditingAllowed","_handleReconnectionResponse","offset","marker","_shouldSendSelectionUpdate","roots","change:_isPendingUpdate","isReadOnly","unregister","571398MRKVfQ","document","_handleReceivedOperations","collaboration-missing-channelid","keys","rootName","_knownRootNames","createdAt","_baseBufferDelay","config","_operationToId","decompress","_bufferedOperations","currentDocumentSession","isPremiumPlugin","length","_sendBufferedOperationsDelayed","655880FLXBYx","_handleServerResponse"];return(co=function(){return t})()}function uo(t,e){const n=co();return(uo=function(t,e){return n[t-=409]})(t,e)}!function(t){const e=uo,n=t();for(;;)try{if(992717===parseInt(e(414))/1+parseInt(e(543))/2*(-parseInt(e(420))/3)+-parseInt(e(526))/4+parseInt(e(623))/5*(-parseInt(e(509))/6)+parseInt(e(410))/7+-parseInt(e(477))/8+-parseInt(e(601))/9*(-parseInt(e(442))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(co);let lo=1;class po extends e.Plugin{static[ao(593)]=(()=>On)();[ao(495)];[ao(621)];[ao(452)];[ao(545)];[ao(651)];[ao(465)];[ao(458)];[ao(521)];[ao(482)];[ao(515)];[ao(570)];[ao(654)];[ao(449)];[ao(517)];[ao(419)];[ao(415)];[ao(579)];[ao(605)];static get[ao(555)](){return[Hn,Qn,hr,e.PendingActions,Fn.Users,r.Notification]}static get[ao(541)](){return ao(425)}static get[ao(560)](){return!0}static get[ao(523)](){return!0}get[ao(528)](){const t=ao;return this[t(635)]+this[t(495)]}get[ao(635)](){const t=ao;return this[t(452)][t(656)]-this[t(495)]}get[ao(462)](){const t=ao,e=this[t(452)][t(566)]();for(let n=e[t(524)]-1;n>=0;n--){const r=e[n];if(!this[t(579)][t(647)](r))return r[t(453)]+1-this[t(495)]}return 0}constructor(t){const e=ao;if(super(t),this[e(495)]=0,this[e(621)]=null,this[e(452)]=new s.History,this[e(434)][e(518)][e(589)](e(631),{}),this[e(545)]=this[e(434)][e(518)][e(529)](e(659)),!this[e(545)])throw new n.CKEditorError(e(512),this);const r=t[e(518)][e(529)](e(657))||n.version;this[e(651)]=new(po[e(593)])(r,this[e(545)]),this[e(465)]=this[e(434)][e(649)][e(510)],this[e(458)]=new so,this[e(521)]=[],this[e(482)]=new WeakSet,this[e(515)]=new Set,this[e(487)](e(448),!1),this[e(487)](e(445),!1),this[e(570)]=null,this[e(654)]=!1,this[e(449)]=null,this[e(517)]=300,this[e(419)]=this[e(517)],this[e(415)]=null,this[e(579)]=new WeakSet,this[e(605)]=new mo(this[e(579)])}[ao(609)](){const t=ao,e=this[t(434)],n=e[t(428)][t(529)](Fn.Users),r=e[t(428)][t(529)](Hn);this[t(620)](n,t(454),(e,r)=>{const s=t,o=r[0];o[s(658)]&&(e[s(640)]=n[s(575)](o[s(658)]),e[s(632)]()),null===o[s(658)]&&(e[s(640)]=null,e[s(632)]())},{priority:t(473)}),this[t(620)](e[t(649)][t(510)][t(475)],t(455),(e,n)=>{const r=t;n[r(567)]&&this[r(551)]()}),this[t(620)](e[t(610)][t(581)],t(571),()=>{this[t(551)]()}),this[t(622)](),e[t(649)].on(t(597),(e,n)=>{const r=t,s=n[0];s[r(612)]&&(this[r(499)](s),this[r(437)]()&&this[r(525)]())}),this[t(556)](),this[t(417)](t(580)).to(r,t(413),this,t(445),(e,n)=>t(643)===e&&!n),this.on(t(500),()=>{const n=t;this[n(580)]?e[n(548)](n(650)):e[n(429)](n(650))}),this[t(580)]?e[t(548)](t(650)):e[t(429)](t(650)),this[t(487)](t(662),!1)}async[ao(628)](){const t=ao,e=this[t(434)][t(428)][t(529)](Qn),n=this[t(434)][t(428)][t(529)](Hn);try{this[t(448)]=!0,e[t(508)](this[t(545)]);const r=await this[t(651)][t(628)](n[t(554)],this[t(462)]);await this[t(501)](r)&&(this[t(448)]=!1,this[t(564)]());const s=await this[t(651)][t(661)]();e[t(485)](this[t(545)],s),this[t(550)](),this[t(662)]=!0}catch(e){if(function(e){const n=t;return n(496)===e[n(591)]}(e)&&this[t(621)])await this[t(486)]();else if(function(e){const n=t;return n(444)===e[n(591)]}(e)){const e=mr(this[t(434)][t(614)],t(464));this[t(584)](e)}else{if(!(e instanceof ho))throw e;this[t(584)]()}}}[ao(498)](){const t=ao,e=this[t(434)][t(428)][t(529)](Hn),n=this[t(434)][t(428)][t(529)](Qn);this[t(434)][t(429)](t(544)),n[t(666)][t(647)](this[t(545)])&&n[t(508)](this[t(545)]),e[t(538)](this),this[t(565)](),super[t(498)]()}async[ao(501)](t){const e=ao;if(this[e(621)]!==t[e(621)]&&this[e(415)]!==t[e(424)])throw new ho;return this[e(621)]=t[e(621)],this[e(527)]([],{...t,wereChangesApplied:!1,data:t[e(531)]},e(628))}async[ao(636)](t,e=!1){const n=ao,{connection:r}=this[n(434)][n(428)][n(529)](Hn);po[n(593)][n(661)](r,this[n(545)])[n(439)](t=>this[n(587)](t))[n(456)](t=>{const e=n;this[e(438)](e(572),t)}),this[n(620)](this[n(651)],n(648),this[n(511)][n(417)](this)),this[n(620)](this[n(651)],n(432),(t,e)=>{const r=n;this[r(438)](r(426),e)}),this[n(620)](this[n(651)],n(480),()=>{this[n(662)]=!1});const s=this[n(605)][n(422)](t);this[n(448)]=!0;const o=await this[n(651)][n(409)](r,this[n(450)](t),s);if(this[n(621)]=o[n(621)],e){if(!o[n(577)])return void this[n(584)]();this[n(448)]=!1,this[n(564)](),this[n(452)][n(637)](),this[n(495)]=o[n(502)],this[n(452)][n(656)]=this[n(495)],await this[n(527)](t,o,n(446))}else await this[n(586)](o,t);this[n(550)](),this[n(662)]=!0}[ao(550)](){const t=ao,e=this[t(434)][t(428)][t(529)](Qn),n=this[t(434)][t(428)][t(529)](hr),r=e[t(666)][t(529)](this[t(545)]);r&&r[t(524)]>1?n[t(595)]():this[t(620)](e,t(533)+this[t(545)],()=>{const r=t;2===e[r(666)][r(529)](this[r(545)])[r(524)]&&n[r(595)]()})}async[ao(511)](t,e,n,r){const s=ao;if(!this[s(448)]&&this[s(465)][s(656)]==e){const t=this[s(443)](n,r);await this[s(660)](t),this[s(655)](t,e,n[s(424)])||this[s(438)](s(436))}}async[ao(486)](){const t=ao;this[t(565)]();const{locale:e}=this[t(434)];let n;try{n=await this[t(651)][t(549)]()}catch{const n=mr(e,t(483));return void this[t(584)](n)}const r=n[t(522)]||n[t(670)];if(this[t(415)]!==r[t(424)]){const n=mr(e,t(663));return void this[t(584)](n)}await this[t(636)](this[t(434)][t(649)][t(510)][t(582)][t(566)](),!0)}[ao(565)](){const t=ao;this[t(651)][t(558)](),this[t(521)]=[],clearTimeout(this[t(449)]),this[t(668)](this[t(651)])}[ao(587)](t){const e=ao,n=this[e(434)][e(428)][e(529)](Qn);this[e(620)](n,e(533)+this[e(545)],(t,{session:r})=>{const s=e;if(r.id===n[s(474)]){t[s(604)]();const e=this[s(434)][s(428)][s(647)](s(607))&&this[s(434)][s(428)][s(529)](s(607));let n=r[s(463)];e&&e[s(479)]&&(n=n[s(493)](t=>s(642)!==t)),this[s(434)][s(428)][s(529)](s(585))[s(440)](n,this[s(545)])}}),n[e(485)](this[e(545)],t)}[ao(622)](){const t=ao,e=this[t(434)][t(531)][t(487)];this[t(434)][t(531)][t(487)]=(...r)=>{const s=t;if(!r[r[s(524)]-1][s(469)])throw new n.CKEditorError(s(618),this);e[s(598)](this[s(434)][s(531)],r)}}[ao(556)](){const t=ao;this[t(434)][t(531)].on(t(609),(e,[r])=>{const o=t;if(this[o(465)][o(656)])throw new n.CKEditorError(o(645),this);e[o(632)](),this[o(490)]();const i=this[o(434)][o(518)][o(529)](o(534)),a=this[o(542)](r,i);0==a[o(524)]&&a[o(641)](new s.NoOperation(0)),e[o(640)]=this[o(636)](a)[o(439)](()=>{const t=o;this[t(434)][t(428)][t(529)](Hn)[t(592)](this),this[t(434)][t(531)][t(629)](t(639))})[o(456)](t=>this[o(438)](o(536),t))[o(652)](()=>this[o(564)]())},{priority:t(473)}),this[t(434)].on(t(599),async(e,[n,r])=>{const s=t;e[s(632)]();const o=this[s(434)][s(649)][s(510)][s(557)](n);if(!this[s(515)][s(647)](n)){const t=r&&r[s(531)]?r[s(531)]:"",e=r&&r[s(481)]?r[s(481)]:{};await this[s(535)](n,t,e)}this[s(434)][s(649)][s(431)]({isUndoable:!1},()=>{const t=s;o[t(615)]=!0,this[t(434)][t(649)][t(510)][t(427)][t(553)](o)})},{priority:t(473)})}async[ao(660)](t){const e=ao,n=this[e(434)][e(428)][e(529)](Fn.Users),{connection:r}=this[e(434)][e(428)][e(529)](Hn),s=new Set;for(const r of t){const t=r[e(658)];t&&!n[e(575)](t)&&s[e(578)](t)}if(0===s[e(491)])return;const o=await b[e(634)](r,Array[e(569)](s));for(const t of o)n[e(575)](t.id)||n[e(669)](t)}[ao(542)](t,e={}){const r=ao,o=this[r(434)][r(649)],i=[];let a=0;const c=r(451)==typeof t?{main:t}:t;for(const t of Object[r(513)](c)){if(!this[r(465)][r(505)][r(647)](t))throw new n.CKEditorError(r(625),this);const e=this[r(434)][r(531)][r(583)](c[t]),u=this[r(465)][r(557)](t),d=new s.InsertOperation(o[r(494)](u,0),e,a++);i[r(641)](d);for(const[t,n]of e[r(471)]){const e=o[r(488)](o[r(627)](u,n[r(484)][r(568)][r(470)]()),o[r(627)](u,n[r(603)][r(568)][r(470)]())),c=new s.MarkerOperation(t,null,e,o[r(471)],!0,a++);i[r(641)](c)}}if(e)for(const[t,c]of Object[r(447)](e)){const e=o[r(510)][r(557)](t);if(!e)throw new n.CKEditorError(r(602),null);for(const[t,n]of Object[r(447)](c))if(null!==n){const o=new s.RootAttributeOperation(e,t,null,n,a++);i[r(641)](o)}}return i}async[ao(535)](t,e,n){const r=ao;this[r(542)]({[t]:e},{[t]:n})[r(530)]((t,e)=>{const n=r;t[n(453)]=this[n(465)][n(656)]+e,t[n(606)]=!0,this[n(499)](t)}),this[r(525)](),await this[r(435)]()}async[ao(586)](t,e){const n=ao;let r;this[n(495)]=t[n(502)];const s=t[n(577)]&&!t[n(594)],o=s?0:t[n(531)][n(453)];if(e[n(530)](e=>{const r=n;e[r(606)]=!0,e[r(516)]=t[r(664)],e[r(658)]=null}),s)r=e,this[n(411)](r,s);else{if(t[n(594)]){const e=this[n(542)](t[n(594)]);this[n(465)][n(582)][n(656)]=-e[n(524)],e[n(530)](r=>{const s=n;r[s(453)]-=e[s(524)],r[s(516)]=t[s(664)],r[s(606)]=!0,r[s(658)]=null}),this[n(411)](e,!0),this[n(452)][n(656)]=-e[n(524)]+this[n(495)],this[n(540)](e)}this[n(465)][n(582)][n(656)]=o,r=this[n(443)](t[n(531)],t[n(653)]),await this[n(660)](r),this[n(411)](r,s)}t[n(424)]&&(this[n(605)][n(416)](r,t[n(424)]),this[n(415)]=t[n(424)]),this[n(452)][n(656)]=o+this[n(495)],this[n(540)](r),e[n(493)](t=>{const e=n,r=this[e(461)](t);return r&&!this[e(515)][e(647)](r)})[n(530)]((t,e)=>{const r=n;t[r(453)]=this[r(465)][r(656)]+e,this[r(499)](t)}),this[n(437)]()?(this[n(419)]=0,this[n(525)](!0),await this[n(435)]()):(this[n(448)]=!1,this[n(564)]())}[ao(438)](t,e){const r=ao,s=e&&e[r(596)];if(s&&s[r(608)](r(561)))throw e;const o=this[r(434)][r(428)][r(529)](Hn);throw this[r(448)]=!0,o[r(558)](),this[r(434)][r(429)](r(624)),new n.CKEditorError(t,this[r(434)],s?{originalError:s}:void 0)}[ao(499)](t){const e=ao;this[e(482)][e(647)](t)||(this[e(482)][e(578)](t),this[e(521)][e(641)](t),this[e(570)]||e(503)==t[e(552)]&&!t[e(539)]||this[e(490)]())}[ao(525)](t=!1){const e=ao;!t&&this[e(448)]||(this[e(448)]=!0,clearTimeout(this[e(449)]),this[e(449)]=setTimeout(()=>{const t=e;this[t(646)]()[t(439)](e=>{const n=t;e&&(this[n(564)](),this[n(448)]=!1)})[t(456)](e=>{const n=t;this[n(564)](),this[n(448)]=!1,function(t){const e=n;return t[e(596)][e(608)](e(574))||t[e(596)][e(608)](e(617))||t[e(596)][e(608)](e(418))}(e)||this[n(438)](e[n(596)],e)})},this[e(419)]))}[ao(435)](){return new Promise(t=>{const e=uo;this.on(e(506),()=>{t()})})}async[ao(646)](){const t=ao,e=this[t(434)][t(428)][t(529)](hr);if(this[t(504)]()&&(e[t(595)](),this[t(654)]=!1),!this[t(437)]())return!0;const n=[...this[t(521)]];for(const e of n)e[t(562)]=this[t(465)][t(582)][t(433)](e);const r=this[t(605)][t(422)](n),s=lo++,o=this[t(450)](n),i=await this[t(651)][t(537)](o,o[t(453)],r);try{return await this[t(527)](n,i,s)}catch(e){return this[t(438)](t(638),e)}}async[ao(527)](t,e,n){const r=ao;if(r(432)in e)throw e[r(432)];let s=!1;if(e[r(577)]){e[r(424)]&&(this[r(415)]=e[r(424)]),this[r(521)]=this[r(521)][r(493)](e=>!t[r(430)](e));for(const n of t)n[r(516)]=r(478)in e&&e[r(478)]||void 0;fo(t,e[r(656)]-t[r(524)]),this[r(540)](t);const n=t[r(493)](t=>{const e=r;if(!t[e(606)])return!1;const n=this[e(461)](t);return n&&!this[e(515)][e(647)](n)});fo(n,this[r(465)][r(656)]),this[r(411)](n),s=!0,this[r(419)]=this[r(517)]}else{const t=this[r(443)](e[r(531)],e[r(653)])[r(493)](t=>t[r(453)]>=this[r(635)]);t[r(530)](t=>this[r(563)](t)),this[r(521)]=this[r(521)][r(493)](t=>!t[r(606)]||!this[r(515)][r(647)](this[r(461)](t))),this[r(521)][r(524)]&&fo(this[r(521)],this[r(521)][0][r(453)]),await this[r(660)](t),s=this[r(655)](t,e[r(656)],e[r(424)]),this[r(419)]=Math[r(559)](this[r(419)]/2)}return s?!this[r(437)]()||(this[r(525)](!0),!1):this[r(438)](r(467))}[ao(655)](t,e,n){const r=ao;try{const o={document:this[r(465)],useRelations:!1,padWithNoOps:!0},{operationsA:i,operationsB:a,originalOperations:c}=(0,s.transformOperationSets)(t,this[r(521)],o);fo(i,this[r(465)][r(656)]),fo(a,e);for(const t of i){const e=c[r(529)](t);t[r(658)]=e?e[r(658)]:null}n&&(this[r(605)][r(416)](t,n),this[r(415)]=n),this[r(521)]=[...a],this[r(411)](i),this[r(540)](t)}catch(t){return console[r(432)](t),!1}return!0}[ao(411)](t,e=!1){const n=ao;this[n(434)][n(649)][n(431)]({isUndoable:!1,isLocal:!1},e=>{const r=n;for(const n of t)this[r(482)][r(578)](n),this[r(563)](n),e[r(644)][r(619)](n),this[r(434)][r(649)][r(597)](n)})}[ao(563)](t){const e=ao,n=this[e(461)](t);n&&this[e(515)][e(578)](n)}[ao(461)](t){const e=ao;let n,r;switch(t[e(552)]){case e(613):n=t[e(468)][e(421)];break;case e(503):if(r=t[e(590)],!r)return null;n=r[e(421)];break;case e(600):n=t[e(421)];break;case e(459):n=t[e(546)];break;case e(626):n=t[e(441)][e(421)];break;default:return null}return n[e(514)]}[ao(540)](t){const e=ao;t[e(530)](t=>{const n=e,r=t[n(576)]();r[n(658)]=t[n(658)],r[n(606)]=!!t[n(606)],r[n(516)]=t[n(516)],r[n(453)]+=this[n(495)],t[n(472)]&&this[n(579)][n(578)](r),this[n(452)][n(619)](r)})}[ao(584)](t){const e=ao,n=this[e(434)][e(428)][e(529)](e(489)),r=this[e(434)][e(614)];t||(t=mr(r,e(633))),n[e(457)](t,{title:mr(r,e(611)),namespace:e(630)}),this[e(445)]=!0,clearTimeout(this[e(449)]),this[e(521)]=[],this[e(434)][e(428)][e(529)](Hn)[e(558)]()}[ao(490)](){const t=ao;this[t(570)]||(this[t(570)]=this[t(434)][t(428)][t(529)](e.PendingActions)[t(578)](mr(this[t(434)][t(614)],t(547))))}[ao(564)](){const t=ao;this[t(570)]&&(this[t(434)][t(428)][t(529)](e.PendingActions)[t(573)](this[t(570)]),this[t(570)]=null)}[ao(450)](t){const e=ao,n=t[e(476)](t=>t[e(667)]());return this[e(458)][e(423)](n)}[ao(443)](t,e){const n=ao;return this[n(458)][n(520)](t)[n(476)]((t,r)=>{const o=n,i=o(609)==e[r][o(552)];if(o(588)==t[o(616)]){const e=t[o(468)][o(421)];!this[o(465)][o(557)](e)&&(this[o(465)][o(665)](o(460),e)[o(532)]=!1)}const a=s.OperationFactory[o(492)](t,this[o(465)]);return a[o(562)]=t[o(562)],a[o(606)]=i,a[o(658)]=i?null:e[r][o(466)],a[o(472)]=o(412)===e[r][o(552)],a[o(516)]=e[r][o(516)],a})}[ao(551)](){const t=ao;this[t(654)]=!0,this[t(504)]()?this[t(525)]():this[t(654)]=!1}[ao(504)](){const t=ao,e=this[t(434)][t(428)][t(529)](Qn)[t(666)][t(529)](this[t(545)]);return!this[t(434)][t(507)]&&!!e&&e[t(524)]>1&&this[t(654)]}[ao(437)](){const t=ao;return this[t(521)][t(524)]>0||this[t(504)]()}}class ho extends Error{}function fo(t,e){const n=ao;for(const r of t)r[n(453)]=e++}class mo{[ao(497)];[ao(519)];constructor(t){const e=ao;this[e(497)]=t,this[e(519)]=new WeakMap}[ao(422)](t){const e=ao;let r=t[e(524)];for(;r--;){const s=t[r];if(!this[e(497)][e(647)](s)){if(!this[e(519)][e(647)](s)){const t=(0,n.uid)()[e(470)](1,18);this[e(519)][e(487)](s,t)}return this[e(519)][e(529)](s)}}}[ao(416)](t,e){const n=ao;if(!e)return;let r=t[n(524)];for(;r--;){const s=t[r];this[n(497)][n(647)](s)||this[n(519)][n(487)](s,e)}}}var yo=go;function go(t,e){var n=bo();return(go=function(t,e){return n[t-=485]})(t,e)}function bo(){var t=["isOfficialPlugin","1163262vEffCJ","1294165MdbjFW","350032yiFpvC","RealTimeCollaborativeEditing","2450574ZUfrPg","3064yePcWx","36441GkMSiz","20UcMKBe","isPremiumPlugin","72152GSshHt","requires","169662wvKqnf","pluginName"];return(bo=function(){return t})()}!function(t){for(var e=go,n=t();;)try{if(218037===-parseInt(e(495))/1+-parseInt(e(488))/2+-parseInt(e(497))/3*(parseInt(e(493))/4)+-parseInt(e(487))/5+-parseInt(e(486))/6+-parseInt(e(490))/7+-parseInt(e(491))/8*(-parseInt(e(492))/9))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(bo);class Io extends e.Plugin{static get[yo(496)](){return[po]}static get[yo(498)](){return yo(489)}static get[yo(485)](){return!0}static get[yo(494)](){return!0}}const Oo=So;function vo(){const t=["context","addCommentThread","permissions","comments","addComment","addUser","isOfficialPlugin","6178652LbZxvF","size","reopenCommentThread","22pYDxwY","commentThreadUpdated","map","resolvedBy","5768NtyNNx","mySessionId","addToReconnectionStack","4054110hzErHW","createdAt","getComment","reconnect","connect","content","commentThreadResolved","removeCommentThread","pluginName","from","commentThreadAdded","off","7711301xNSWlS","destroy","5TbSBKk","Permissions","_getService","_connectService","update","404","_terminateService","delete","_fetchMissingUsersForThreads","252024OVNosj","_setUpService","cloud-services-internal-error: Comments Service is not connected.","catch","commentThreadReopened","startsWith","listenTo","371904msFVGv","updateComment","commentRemoved","cloudservicescommentsadapter-connect-already-connected","register","unregister","removeComment","resolvedAt","getConnectedSessions","remove","getCommentThread","CommentsRepository","keys","commentUpdated","userId","commentThreadRemoved","set","authorId","commentAdded","isPremiumPlugin","3kkiWSb","CloudServicesCommentsAdapter","disconnect","cloudservicescommentsadapter-service-not-exist","getUser","7550757zeRCSQ","reopen","cloud-services-internal-error: Not connected.","5SFvBAh","cloud-services-internal-error: Request timeout.","attributes","code","_services","resolve","adapter","36ziraSl","plugins","getCommentThreads","init","setPermissions","resolveCommentThread","deletedAt","cloudservicescommentsadapter-disconnect-not-exist","commentId","add","collaboration.channelId","getMany","updateCommentThread","message","CommentsService","get","assign","has","config","requires","commentThreadId","sessionAdd:","15869MYXLot"];return(vo=function(){return t})()}!function(t){const e=So,n=t();for(;;)try{if(925762===-parseInt(e(422))/1*(parseInt(e(438))/2)+-parseInt(e(458))/3*(parseInt(e(398))/4)+-parseInt(e(466))/5*(parseInt(e(431))/6)+-parseInt(e(390))/7*(-parseInt(e(405))/8)+parseInt(e(463))/9+parseInt(e(408))/10*(-parseInt(e(401))/11)+parseInt(e(473))/12*(parseInt(e(420))/13))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(vo);class wo extends e.ContextPlugin{static[Oo(487)]=(()=>Ln)();[Oo(470)];static get[Oo(492)](){return[Hn,Oo(449),Qn,Fn.Users]}static get[Oo(416)](){return Oo(459)}static get[Oo(397)](){return!0}static get[Oo(457)](){return!0}constructor(t){const e=Oo;super(t),this[e(470)]=new Map}async[Oo(476)](){const t=Oo,n=this[t(391)],r=n[t(474)][t(488)](t(449));if(n[t(474)][t(488)](Hn)[t(407)](this),r[t(472)]={addCommentThread:async({channelId:e,threadId:n,comments:r,resolvedAt:s,resolvedBy:o,context:i,attributes:a})=>{const c=t,u=await this[c(424)](e)[c(392)]({commentThreadId:n,comments:r[c(403)](t=>function(t,e,n){const r=c;return{commentThreadId:n,commentId:t[r(481)],userId:t[r(455)],content:t[r(413)],documentId:e,createdAt:t[r(409)],attributes:t[r(468)]||{}}}(t,e,n)),resolvedAt:s,resolvedBy:o,context:i,attributes:a})[c(434)](Ao);return{threadId:u[c(493)],comments:u[c(394)]}},getCommentThread:async({channelId:e,threadId:n})=>{const r=t,s=await this[r(424)](e)[r(448)](n)[r(434)](ko)[r(434)](Ao);return s?s[r(479)]?null:(await this[r(430)]([s]),{threadId:s[r(493)],comments:s[r(394)][r(403)](To),context:s[r(391)],resolvedAt:s[r(445)],resolvedBy:s[r(404)],attributes:s[r(468)]||{}}):null},updateCommentThread:async({channelId:e,threadId:n,context:r,unlinkedAt:s,attributes:o})=>this[t(424)](e)[t(485)]({commentThreadId:n,context:r,attributes:o,unlinkedAt:s})[t(434)](ko)[t(434)](Ao),resolveCommentThread:async({channelId:e,threadId:n})=>{const r=t,s=await this[r(424)](e)[r(478)](n)[r(434)](ko)[r(434)](Ao);return{threadId:s[r(493)],resolvedAt:s[r(445)],resolvedBy:s[r(404)]}},reopenCommentThread:async({channelId:e,threadId:n})=>this[t(424)](e)[t(400)](n)[t(434)](ko)[t(434)](Ao),removeCommentThread:({channelId:e,threadId:n})=>this[t(424)](e)[t(415)](n)[t(434)](ko)[t(434)](Ao),addComment:({channelId:e,threadId:n,commentId:r,content:s,attributes:o})=>this[t(424)](e)[t(395)](n,r,s,o)[t(434)](Ao),updateComment:({channelId:e,threadId:n,commentId:r,content:s,attributes:o})=>this[t(424)](e)[t(439)](n,r,s,o)[t(434)](ko)[t(434)](Ao),removeComment:({channelId:e,threadId:n,commentId:r})=>this[t(424)](e)[t(444)](n,r)[t(434)](ko)[t(434)](Ao)},n instanceof e.Context){const e=n[t(491)][t(488)](t(483)),r=n[t(474)][t(488)](Qn);await this[t(432)](e);const s=await this[t(470)][t(488)](e)[t(446)]();this[t(437)](r,t(494)+e,(n,{session:s})=>{const o=t;s.id===r[o(406)]&&(n[o(419)](),this[o(391)][o(474)][o(488)](o(423))[o(477)](s[o(393)],e))}),r[t(442)](e,s)}}async[Oo(432)](t){const e=Oo;if(this[e(470)][e(490)](t))throw new n.CKEditorError(e(441),null,{channelId:t});const r=this[e(391)][e(474)][e(488)](e(449)),s=new(wo[e(487)])(t);this[e(470)][e(454)](t,s),this[e(437)](s,e(418),(t,n)=>{const s=e,{commentThreadId:o,documentId:i,context:a,attributes:c,resolvedAt:u,resolvedBy:d,comments:l}=n;r[s(448)](o)||r[s(392)]({threadId:o,channelId:i,comments:l?l[s(403)](To):[],context:a,attributes:c,resolvedAt:u,resolvedBy:d,isFromAdapter:!0})}),this[e(437)](s,e(402),(t,{commentThreadId:n,documentId:s,context:o,unlinkedAt:i,attributes:a})=>{const c=e;r[c(448)](n)&&r[c(485)]({threadId:n,channelId:s,context:o,unlinkedAt:i,attributes:a,isFromAdapter:!0})}),this[e(437)](s,e(414),(t,{commentThreadId:n,resolvedBy:s,resolvedAt:o})=>{const i=e,a=r[i(448)](n);a&&a[i(471)]({resolvedBy:s,resolvedAt:o,isFromAdapter:!0})}),this[e(437)](s,e(435),(t,{commentThreadId:n})=>{const s=e,o=r[s(448)](n);o&&o[s(464)]({isFromAdapter:!0})}),this[e(437)](s,e(453),(t,{commentThreadId:n})=>{const s=e,o=r[s(448)](n);o&&o[s(447)]({isFromAdapter:!0})}),this[e(437)](s,e(456),(t,n)=>{const s=e,o=n[s(493)],i=r[s(448)](o);i&&i[s(395)]({...To(n),isFromAdapter:!0})}),this[e(437)](s,e(451),(t,{commentThreadId:n,commentId:s,content:o,attributes:i})=>{const a=e,c=r[a(448)](n);if(c){const t=c[a(410)](s);t&&t[a(426)]({content:o,attributes:i,isFromAdapter:!0})}}),this[e(437)](s,e(440),(t,{commentThreadId:n,commentId:s})=>{const o=e,i=r[o(448)](n);if(i){const t=i[o(410)](s);t&&t[o(447)]({isFromAdapter:!0})}}),await this[e(425)](t)}[Oo(421)](){const t=Oo;if(this[t(391)]instanceof e.Context){const e=this[t(391)][t(491)][t(488)](t(483));this[t(428)](e)}}[Oo(428)](t){const e=Oo;if(!this[e(470)][e(490)](t))throw new n.CKEditorError(e(480),null,{channelId:t});this[e(424)](t)[e(460)](),this[e(470)][e(429)](t)}async[Oo(411)](){const t=Oo;for(const e of this[t(470)][t(450)]())await this[t(425)](e);if(this[t(391)]instanceof e.Context){const e=this[t(391)][t(491)][t(488)](t(483)),n=this[t(391)][t(474)][t(488)](Qn);n[t(443)](e);const r=await this[t(470)][t(488)](e)[t(446)]();n[t(442)](e,r)}}async[Oo(425)](t){const e=Oo,{connection:n}=this[e(391)][e(474)][e(488)](Hn),r=this[e(391)][e(474)][e(488)](e(449)),s=this[e(470)][e(488)](t),o=await s[e(412)](n);await this[e(430)](o);const i=new Set(Array[e(417)](r[e(475)]({channelId:t}),t=>t.id));for(const t of o)t[e(479)]||i[e(429)](t[e(493)]);for(const t of i)r[e(448)](t)[e(447)]({isFromAdapter:!0});for(const n of o){let s=r[e(448)](n[e(493)]);const{commentThreadId:o,context:i,attributes:a,resolvedBy:c,resolvedAt:u,unlinkedAt:d,deletedAt:l}=n;if(l)continue;s||(s=r[e(392)]({channelId:t,threadId:o,context:i,attributes:a||{},resolvedBy:c,resolvedAt:u,unlinkedAt:d,isFromAdapter:!0}));const p=new Set(Array[e(417)](s[e(394)],t=>t.id));for(const t of n[e(394)])p[e(429)](t[e(481)]);for(const t of p)s[e(410)](t)[e(447)]({isFromAdapter:!0});for(const t of n[e(394)]){const n=s[e(410)](t[e(481)]);n?n[e(413)]!==t[e(413)]&&n[e(426)]({content:t[e(413)],isFromAdapter:!0}):s[e(395)](Object[e(489)](To(t),{isFromAdapter:!0}))}}}[Oo(424)](t){const e=Oo;if(!this[e(470)][e(490)](t))throw new n.CKEditorError(e(461),null,{channelId:t});return this[e(470)][e(488)](t)}async[Oo(430)](t){const e=Oo,n=this[e(391)][e(474)][e(488)](Fn.Users),{connection:r}=this[e(391)][e(474)][e(488)](Hn),s=new Set;for(const{resolvedBy:r,comments:o}of t){r&&!n[e(462)](r)&&s[e(482)](r);for(const{userId:t}of o)n[e(462)](t)||s[e(482)](t)}if(0===s[e(399)])return;const o=await b[e(484)](r,Array[e(417)](s));for(const t of o)n[e(462)](t.id)||n[e(396)](t)}}function So(t,e){const n=vo();return(So=function(t,e){return n[t-=390]})(t,e)}async function ko(t){const e=Oo;if(e(427)!==t[e(469)])throw t}function Ao(t){const e=Oo;if((n=t)[e(486)][e(436)](e(433))||n[e(486)][e(436)](e(465))||n[e(486)][e(436)](e(467)))return new Promise(()=>{});var n;throw t}function To(t){const e=Oo;return{threadId:t[e(493)],commentId:t[e(481)],content:t[e(413)],createdAt:t[e(409)],authorId:t[e(452)],attributes:t[e(468)]||{}}}function _o(){const t=["TrackChangesService","21xyZgHy","open","addUser","_fetchMissingUsersForThreads","get","set","8321139ugCnhE","reconnect","attributes","isConnected","895400qkGLqe","148766chjbQf","getUser","catch","message","CloudServicesTrackChangesAdapter","addToReconnectionStack","off","startsWith","2502860mSHHIx","1376545OyYSLv","init","suggestionUpdated","getSuggestion","then","state","find","update","_trackChangesService","isOfficialPlugin","connected","originalSuggestionId","from","plugins","pluginName","hasSuggestion","addSuggestionData","collaboration.channelId","_waitForServiceReady","add","size","data","21UblPNn","15EzqOUD","_bufferedRequests","getMany","cloud-services-internal-error: Request timeout.","delete","TrackChangesEditing","requires","connect","values","config","596396ToGPgR","isPremiumPlugin","1467125qiJQec","connection","cloud-services-internal-error: Not connected.","adapter","listenTo","_saved","editor","type","12MxBtUj"];return(_o=function(){return t})()}const Co=jo;!function(t){const e=jo,n=t();for(;;)try{if(664869===-parseInt(e(224))/1*(-parseInt(e(257))/2)+-parseInt(e(246))/3*(parseInt(e(234))/4)+-parseInt(e(266))/5*(parseInt(e(244))/6)+parseInt(e(223))/7*(parseInt(e(256))/8)+parseInt(e(252))/9+-parseInt(e(265))/10+parseInt(e(236))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(_o);class Po extends e.Plugin{static[Co(245)]=(()=>Qe)();[Co(225)];[Co(274)];static get[Co(230)](){return[wo,Co(229),Hn]}static get[Co(280)](){return Co(261)}static get[Co(275)](){return!0}static get[Co(235)](){return!0}constructor(t){const e=Co;super(t);const n=this[e(242)][e(233)][e(250)](e(283));this[e(225)]=new Map,this[e(274)]=new(Po[e(245)])(n)}[Co(267)](){const t=Co,e=this[t(242)][t(279)][t(250)](Hn),n=this[t(242)][t(279)][t(250)](t(229));return n[t(239)]={getSuggestion:async e=>{const n=t;await this[n(284)]();const r=await this[n(274)][n(250)](e)[n(259)](Eo);return await this[n(249)]([r]),r},addSuggestion:async({id:e,type:n,data:r,originalSuggestionId:s,attributes:o})=>{const i=t;await this[i(284)]();const a={id:e,type:n,data:r,originalSuggestionId:s,attributes:o},c=await this[i(274)][i(285)](e,n,r,s,o)[i(259)](t=>{if(Do(t))return new Promise(t=>{const n=jo;this[n(225)][n(251)](e,{resolve:t,suggestionData:a})});throw t});return this[i(225)][i(228)](e),c},updateSuggestion:async(e,n)=>{const r=t;if(await this[r(284)](),r(247)!==n[r(271)])return this[r(274)][r(273)](e,n)[r(259)](Eo)}},this[t(240)](this[t(274)],t(268),(e,r)=>{const s=t;n[s(281)](r.id)&&(n[s(269)](r.id)[s(254)]=r[s(254)])}),this[t(274)][t(231)](e[t(237)])[t(270)](r=>(e[t(262)](this),this[t(249)](r)[t(270)](()=>{const e=t;for(const t of r)n[e(282)](t)[e(241)]=!0})))}async[Co(253)](){const t=Co,e=this[t(242)][t(279)][t(250)](t(229)),{connection:n}=this[t(242)][t(279)][t(250)](Hn),r=await this[t(274)][t(231)](n);await this[t(249)](r);for(const{suggestionData:e,resolve:n}of this[t(225)][t(232)]()){let s=r[t(272)](t=>t.id===e.id);s||(s=await this[t(274)][t(285)](e.id,e[t(243)],e[t(222)],e[t(277)])),n(s)}for(const n of r)e[t(281)](n.id)||e[t(282)](n)}async[Co(284)](){const t=Co;this[t(274)][t(255)]||await new Promise(e=>{const n=t;this[n(240)](this[n(274)],n(276),t=>{t[n(263)](),e()})})}async[Co(249)](t){const e=Co,n=this[e(242)][e(279)][e(250)](Fn.Users),{connection:r}=this[e(242)][e(279)][e(250)](Hn),s=new Set;for(const{authorId:r}of t)n[e(258)](r)||s[e(285)](r);if(0===s[e(221)])return;const o=await b[e(226)](r,Array[e(278)](s));for(const t of o)n[e(258)](t.id)||n[e(248)](t)}}function Eo(t){if(Do(t))return new Promise(()=>{});throw t}function jo(t,e){const n=_o();return(jo=function(t,e){return n[t-=221]})(t,e)}function Do(t){const e=Co;return t[e(260)][e(264)](e(238))||t[e(260)][e(264)](e(227))}const xo=Ro;function Ro(t,e){const n=No();return(Ro=function(t,e){return n[t-=193]})(t,e)}function No(){const t=["RealTimeCollaborativeComments","isPremiumPlugin","listenTo","CommentsRepository","1668PVjJvA","Comments","18ptFLaS","isOfficialPlugin","_terminateService","connected","editor","17418jEHxoV","9611JgPLMl","plugins","data","_setUpService","69676zftOIp","requires","ready","get","92lSirfX","isThreadsLoadingPaused","destroy","change:state","init","CommentsEditing","187934BYYuuy","collaboration.channelId","5956360ExaOmq","741568LJOdGx","pluginName","once","839580lgxgLN","config","switchReadOnly"];return(No=function(){return t})()}!function(t){const e=Ro,n=t();for(;;)try{if(206173===parseInt(e(216))/1+parseInt(e(210))/2*(parseInt(e(201))/3)+-parseInt(e(206))/4+parseInt(e(222))/5+-parseInt(e(194))/6*(-parseInt(e(202))/7)+-parseInt(e(219))/8*(parseInt(e(196))/9)+-parseInt(e(218))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(No);class Vo extends e.Plugin{static get[xo(207)](){return[xo(195),wo,Io,Hn]}static get[xo(220)](){return xo(225)}static get[xo(197)](){return!0}static get[xo(226)](){return!0}[xo(214)](){const t=xo,e=this[t(200)][t(203)][t(209)](Hn),n=this[t(200)][t(203)][t(209)](t(215)),r=this[t(200)][t(203)][t(209)](wo);return this[t(200)][t(204)][t(221)](t(208),()=>{const r=t;this[r(227)](e,r(213),(t,e,s)=>{const o=r;n[o(211)]=o(199)!==s})}),this[t(227)](e,t(213),(e,n,r)=>{const s=t;this[s(200)][s(203)][s(209)](s(193))[s(224)](s(199)!==r)}),r[t(205)](this[t(200)][t(223)][t(209)](t(217)))}[xo(212)](){const t=xo;this[t(200)][t(203)][t(209)](wo)[t(198)](this[t(200)][t(223)][t(209)](t(217))),super[t(212)]()}}function Mo(){var t=["TrackChanges","isOfficialPlugin","854919qgJdWy","7EeCLTv","8259132rMbsPn","1AuQBbv","6537410DYYMaz","110kBvjta","isPremiumPlugin","3708micZNj","24dmOPTr","927QzRcoN","666266enNfWL","pluginName","870040AMMaRP","requires","RealTimeCollaborativeTrackChanges","1069850KrAFJS"];return(Mo=function(){return t})()}function Bo(t,e){var n=Mo();return(Bo=function(t,e){return n[t-=424]})(t,e)}var Jo=Bo;!function(t){for(var e=Bo,n=t();;)try{if(718442===parseInt(e(434))/1*(-parseInt(e(441))/2)+-parseInt(e(440))/3*(parseInt(e(438))/4)+parseInt(e(428))/5+parseInt(e(433))/6+parseInt(e(432))/7*(-parseInt(e(425))/8)+parseInt(e(431))/9*(parseInt(e(436))/10)+-parseInt(e(435))/11*(parseInt(e(439))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Mo);class Uo extends e.Plugin{static get[Jo(426)](){return[Vo,Po,Jo(429)]}static get[Jo(424)](){return Jo(427)}static get[Jo(430)](){return!0}static get[Jo(437)](){return!0}}const qo=Yo;function Lo(){const t=["addToReconnectionStack","_createCurrentRevision","_revisionTracker","get","_isPendingUpdate","connect","isEnabled","isConnected","_oldOffset","_handleReconnectionError","state","once","plugins","RevisionHistoryService","bind","_handleRevisionsUpdate","65PFJTri","_bufferUpdate","toVersion","add","serverHistory","change:_isConnected","setSource","buildRevisionData","type","creatorId","message","isPremiumPlugin","authorsIds","_isConnected","fromVersion","startsWith","setRevisionData","addUser","connected","marker","CONNECTED","reverse","3472032qKgQYm","then","keys","2937252EeLRYU","listenTo","authors","collaboration.channelId","isBundleUploaded","getRevision","off","_revisionDataBuilder","init","_preventResendingRevisionData","1090551soiObq","size","RevisionTracker","cloud-services-internal-error: Request timeout.","max","map","RevisionHistory","reconnect","getUser","affectsData","_fixRevision","cloudServices.bundleVersion","_waitForServiceReady","baseVersion","110LQvXZa","_fetchMissingUsers","cloud-services-internal-error: Revision History Service is not connected.","433746bKdyhx","editor","getMany","revisionsUpdated","data","length","sendBufferedUpdates","has","CloudServicesRevisionHistoryAdapter","requires","createdAt","updateRevisions","change:_isPendingUpdate","_update","_offset","isOfficialPlugin","_bufferedUpdates","400","59253WGmHBT","pluginName","64084YsSEYX","wrongRequestId","addRevisionData","repository","_getLatestVersionFromServerOperations","sessionId","235677NoNnXO","_startingVersion","getRevisions","remove","adapter","24KnsOBD","config","code","getOperations","diffData","reInit","catch","connection","_getLatestVersion","_revisions","destroy","_revisionHistoryService","from","isEmptyCurrent","_lastRequestId","cloud-services-internal-error: Not connected.","currentRevision"];return(Lo=function(){return t})()}!function(t){const e=Yo,n=t();for(;;)try{if(502035===parseInt(e(563))/1+-parseInt(e(568))/2*(-parseInt(e(555))/3)+-parseInt(e(557))/4*(parseInt(e(485))/5)+parseInt(e(510))/6+-parseInt(e(520))/7+parseInt(e(507))/8+parseInt(e(537))/9*(-parseInt(e(534))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Lo);class Go extends e.Plugin{static[qo(482)]=(()=>Ve)();[qo(582)];[qo(471)];[qo(579)];[qo(477)];static get[qo(546)](){return[Hn,po,qo(526),Qn,Fn.Users]}static get[qo(556)](){return qo(545)}static get[qo(552)](){return!0}static get[qo(496)](){return!0}constructor(t){const e=qo;super(t);const n=this[e(538)][e(569)][e(472)](e(513));this[e(582)]=null,this[e(471)]=this[e(538)][e(481)][e(472)](e(522)),this[e(579)]=new(Go[e(482)])(n)}async[qo(518)](){const t=qo,e=this[t(538)][t(481)][t(472)](po),r=e[t(489)],s=this[t(538)][t(481)][t(472)](Hn);this[t(471)][t(491)]({history:r,getLatestVersion:()=>this[t(576)](),getCurrentRevisionId:()=>e[t(562)]});const o=this[t(538)][t(569)][t(472)](t(531))||n.version,i=await Ae[t(514)](s[t(575)],o);this[t(538)][t(481)][t(472)](t(526))[t(567)]={getRevision:async({revisionId:e})=>(await this[t(532)](),await this[t(579)][t(515)](e)),updateRevisions:async e=>{const n=t;await this[n(532)]();const r=this[n(471)][n(584)];if(i&&1===e[n(542)]&&e[0].id===r.id)return e;for(const t of e)t.id===r.id&&(t[n(581)]=t[n(499)]===t[n(487)]);return this[n(579)][n(548)](e,this[n(582)])[n(508)](t=>(this[n(582)]=t,e))[n(574)](t=>{const r=n;if(Ho(t)||r(554)===t[r(570)]&&void 0!==t[r(541)][r(558)]){for(const t of e)!this[r(471)][r(560)][r(515)](t.id)||this[r(471)][r(486)](t.id,t,!1);if(Ho(t))throw t;return e}throw t})}},this[t(511)](this[t(579)],t(540),(e,{revisionsData:n,requestId:r})=>{const s=t;Math[s(524)](...n[s(525)](t=>t[s(487)]))>this[s(561)]()-1?this[s(576)]()[s(508)](()=>{this[s(484)](n,r)}):this[s(484)](n,r)});const{revisions:a,requestId:c}=await this[t(579)][t(474)](s[t(575)]);s[t(469)](this),this[t(582)]=c,await this[t(535)](a);for(const e of a)this[t(471)][t(559)](e);this[t(511)](e,t(490),(n,r,s)=>{const o=t;s&&(this[o(477)]=e[o(551)],n[o(516)]())}),this[t(471)][t(483)](t(475)).to(s,t(479),e=>e===Ie[t(505)])}async[qo(527)](){const t=qo,e=this[t(538)][t(481)][t(472)](Hn),n=this[t(538)][t(481)][t(472)](po),r=async()=>{const r=t,s=this[r(471)][r(584)],o=s.id,i=o!==n[r(562)];if(i){const t=n[r(551)]-this[r(477)],e=this[r(561)]();if(this[r(471)][r(517)][r(573)](),s[r(487)]+t!==e){const n=s[r(499)]+t,o=this[r(538)][r(481)][r(472)](Fn.Users),i=this[r(471)][r(492)]({revision:s,from:n,to:e});i.id=s.id;const a=i[r(497)][r(525)](t=>o[r(528)](t));s[r(550)]({...i,authors:a},!0),this[r(471)][r(486)](s.id,i,!0)}this[r(471)][r(564)]=e,s[r(487)]===s[r(499)]&&!this[r(471)][r(553)][r(544)](o)&&this[r(471)][r(560)][r(577)][r(566)](o),this[r(471)][r(470)](e)}const{revisions:a,requestId:c}=await this[r(579)][r(527)](e[r(575)],this[r(582)]);i&&a[r(542)]>0?n[r(478)]():(await this[r(535)](a),this[r(484)](a,c),this[r(471)][r(543)]())};return n[t(498)]?r():new Promise((e,s)=>{const o=t;n[o(480)](o(490),()=>{const t=o;r()[t(508)](e)[t(574)](s)})})}[qo(578)](){super[qo(578)]()}async[qo(532)](){const t=qo;this[t(579)][t(476)]||await new Promise(e=>{const n=t;this[n(511)](this[n(579)],n(503),t=>{t[n(516)](),e()})})}[qo(561)](){const t=qo,e=this[t(538)][t(481)][t(472)](po)[t(489)][t(571)]()[t(506)]();for(const n of e)if(t(504)!==n[t(493)]||n[t(529)])return n[t(533)]+1}[qo(576)](){const t=qo,e=this[t(538)][t(481)][t(472)](po);return new Promise(n=>{const r=t;e[r(473)]?e[r(480)](r(549),()=>{n(this[r(561)]())}):n(this[r(561)]())})}[qo(484)](t,e){const n=qo,r=this[n(471)][n(560)];this[n(582)]=e;for(const e of t){const t=r[n(515)](e.id);if(t){if((e[n(499)]||e[n(487)])&&(e[n(572)]=null),t===this[n(471)][n(584)]){const r=Math[n(524)](t[n(487)],e[n(487)]),s=Math[n(524)](t[n(499)],e[n(499)]);let o;t[n(487)]===e[n(487)]&&t[n(499)]===e[n(499)]?(o=!0,this[n(519)](e)):e[n(487)]===r&&e[n(499)]===s?o=!1:(t[n(487)]===r&&t[n(499)]===s||this[n(530)]({revision:t,from:s,to:r}),o=!0),o&&(delete e[n(499)],delete e[n(487)],delete e[n(572)],delete e[n(547)],delete e[n(497)])}this[n(471)][n(501)](e),this[n(519)](e)}else this[n(471)][n(559)](e)}const s=r[n(565)]();s[n(506)]();for(let t=0;t<s[n(542)]-1;t++){const e=s[t],r=s[t+1];if(e[n(499)]<r[n(487)]){const t=r[n(487)],s=Math[n(524)](t,e[n(487)]);this[n(530)]({revision:e,from:t,to:s})}}}[qo(530)]({revision:t,from:e,to:n}={}){const r=qo,s=this[r(538)][r(481)][r(472)](Fn.Users),o=this[r(471)][r(492)]({revision:t,from:e,to:n});o[r(512)]=o[r(497)][r(525)](t=>s[r(528)](t)),t[r(550)](o)}[qo(519)](t){const e=qo,n={};n.id=t.id;for(const r of Object[e(509)](t))"id"!==r&&(n[r]=void 0);this[e(471)][e(486)](n.id,n,!0)}async[qo(535)](t){const e=qo,n=this[e(538)][e(481)][e(472)](Fn.Users),{connection:r}=this[e(538)][e(481)][e(472)](Hn),s=new Set;for(const n of t){for(const t of n[e(497)])i(t);n[e(494)]&&i(n[e(494)])}if(0===s[e(521)])return;const o=await b[e(539)](r,Array[e(580)](s));for(const t of o)n[e(528)](t.id)||n[e(502)](t);function i(t){const r=e;n[r(528)](t)||s[r(488)](t)}}}function Yo(t,e){const n=Lo();return(Yo=function(t,e){return n[t-=469]})(t,e)}function Ho(t){const e=qo;return t[e(495)][e(500)](e(536))||t[e(495)][e(500)](e(583))||t[e(495)][e(500)](e(523))}var zo=Fo;function Fo(t,e){var n=Ko();return(Fo=function(t,e){return n[t-=460]})(t,e)}function Ko(){var t=["19290ESsJxM","pluginName","RevisionHistory","RealTimeCollaborativeRevisionHistory","257168AuEdgz","isOfficialPlugin","isPremiumPlugin","346090NqHZRS","41953439DnROOn","50COTUbL","requires","203ipJJFW","153iGskUn","928zqCAiA","4068756InUOhe","2788rWrqKR","2043702LNYjrM"];return(Ko=function(){return t})()}!function(t){for(var e=Fo,n=t();;)try{if(730843===-parseInt(e(469))/1*(-parseInt(e(467))/2)+parseInt(e(470))/3+parseInt(e(468))/4+parseInt(e(463))/5*(parseInt(e(471))/6)+parseInt(e(465))/7*(parseInt(e(475))/8)+-parseInt(e(466))/9*(-parseInt(e(461))/10)+-parseInt(e(462))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ko);class Wo extends e.Plugin{static get[zo(464)](){return[zo(473),Go,Io]}static get[zo(472)](){return zo(474)}static get[zo(476)](){return!0}static get[zo(460)](){return!0}}function Qo(t){return function(t){return"object"==typeof t&&null!==t}(t)&&1===t.nodeType&&!function(t){if("object"!=typeof t)return!1;if(null==t)return!1;if(null===Object.getPrototypeOf(t))return!0;if("[object Object]"!==Object.prototype.toString.call(t)){const e=t[Symbol.toStringTag];return null!=e&&(!!Object.getOwnPropertyDescriptor(t,Symbol.toStringTag)?.writable&&t.toString()===`[object ${e}]`)}let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}(t)}const Zo=Xo;function Xo(t,e){const n=$o();return(Xo=function(t,e){return n[t-=129]})(t,e)}function $o(){const t=["1197tBdYvp","bindTemplate","listitem","475524GufHXJ","ck-presence-list__users-counter","usersCount","isHidden","44ztWuLY","47720squPHr","bind","21045nfqHmq","2067304jRTltu","ck-presence-list__counter--hidden","div","1YPcZUm","toString","3914440lBqwdL","_collapseAt","ck-presence-list__users-counter__text","set","466632YLWqkU","ck-presence-list__list-item","1159236TqpNfL","setTemplate"];return($o=function(){return t})()}!function(t){const e=Xo,n=t();for(;;)try{if(395862===-parseInt(e(152))/1*(-parseInt(e(136))/2)+-parseInt(e(148))/3*(-parseInt(e(145))/4)+-parseInt(e(130))/5+parseInt(e(134))/6+parseInt(e(141))/7+-parseInt(e(149))/8+parseInt(e(138))/9*(parseInt(e(146))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}($o);class ti extends r.View{[Zo(131)];constructor(t,e=6){const n=Zo;super(t);const r=this[n(139)];this[n(133)](n(144),!0),this[n(133)](n(143),0),this[n(131)]=e,this[n(147)](n(144)).to(this,n(143),t=>t<e),this[n(137)]({tag:n(151),attributes:{class:["ck",n(135),r.if(n(144),n(150))],role:n(140)},children:[{tag:n(151),attributes:{class:["ck",n(142)]},children:[{tag:n(151),attributes:{class:["ck",n(132)]},children:[{text:r.to(n(143),t=>"+"+(t-this[n(131)]+2)[n(129)]())}]}]}]})}}function ei(t,e){const n=ri();return(ei=function(t,e){return n[t-=487]})(t,e)}const ni=ei;function ri(){const t=["presencelist:hide","261330mFYWEj","57497WWvTPV","hasPopup","setTemplate","items","fire","Connected users list","12wFeBAF","contains","297530tPtmCh","Collapsed connected users list (press ENTER to open it)","createCollection","117RmzwSQ","36909EWClNC","aria-expanded","setAttribute","change:hasPopup","1793284JOukcG","element","div","querySelector","focus","listenTo","bindTemplate","1278648qQarlq","5nVsoII","render","list","ck-presence-list__list","isExpanded",".ck-balloon-panel_with-arrow",".ck-presence-list__dropdown-list","removeAttribute","relatedTarget","set","presencelist:show","2175472kqSUTJ","keystrokes"];return(ri=function(){return t})()}!function(t){const e=ei,n=t();for(;;)try{if(238562===parseInt(e(490))/1+-parseInt(e(496))/2*(-parseInt(e(502))/3)+parseInt(e(506))/4*(parseInt(e(514))/5)+-parseInt(e(489))/6+-parseInt(e(513))/7+parseInt(e(525))/8+parseInt(e(501))/9*(-parseInt(e(498))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ri);class si extends r.View{[ni(493)];[ni(487)];constructor(t){const e=ni;super(t);const r=this[e(512)];this[e(493)]=this[e(500)](),this[e(487)]=new n.KeystrokeHandler,this[e(523)]({hasPopup:!1,isExpanded:!1}),this[e(492)]({tag:e(508),attributes:{"aria-haspopup":r.if(e(491)),"aria-expanded":r.to(e(518),t=>this[e(491)]&&String(t)),"aria-label":r.to(e(491),n=>mr(t,e(n?499:495))),role:e(516),tabindex:r.to(e(491),t=>!!t&&0),class:["ck",e(517)]},children:this[e(493)],on:{mouseenter:r.to(()=>this[e(494)](e(524))),mouseleave:r.to(t=>{const n=e,r=t,s=document[n(509)](n(520)),o=document[n(509)](n(519));s?.[n(497)](r[n(522)])||o?.[n(497)](r[n(522)])||this[n(494)](n(488))})}}),this.on(e(505),(t,n,r)=>{const s=e;this[s(507)]&&(r?this[s(507)][s(504)](s(503),String(this[s(518)])):this[s(507)][s(521)](s(503)))})}[ni(510)](){const t=ni;this[t(507)][t(510)]()}[ni(515)](){const t=ni;super[t(515)](),this[t(487)][t(511)](this[t(507)])}}var oi=__webpack_require__(144),ii={attributes:{"data-cke":!0}};ii.setAttributes=or(),ii.insert=rr().bind(null,"head"),ii.domAPI=er(),ii.insertStyleElement=ar();$n()(oi.A,ii);oi.A&&oi.A.locals&&oi.A.locals;function ai(){const t=["ck-presence-list","5146440CPCJuj","inlineListView","599288WGDxGA","div","hasPopup","116652Dagcak","first","43949547snaQkQ","tooltipPosition","4122032mTbCUB","240AYJJic","17494xazZmn","6796088SjWbQL","bind","ck-reset","counterView","ck-rounded-corners","items","isCollapsed","28izsseI","locale","listenTo","setTemplate","bindTemplate","set","ck-presence-list--collapsed","change"];return(ai=function(){return t})()}function ci(t,e){const n=ai();return(ci=function(t,e){return n[t-=250]})(t,e)}const ui=ci;!function(t){const e=ci,n=t();for(;;)try{if(752696===-parseInt(e(271))/1+parseInt(e(252))/2*(-parseInt(e(251))/3)+-parseInt(e(250))/4+-parseInt(e(269))/5+-parseInt(e(274))/6*(-parseInt(e(260))/7)+-parseInt(e(253))/8+parseInt(e(276))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ai);class di extends r.View{[ui(256)];[ui(270)];constructor(t,e=6){const n=ui;super(t);const r=this[n(264)];this[n(265)](n(259),!0),this[n(256)]=new ti(this[n(261)],e),this[n(270)]=new si(t),this[n(270)][n(254)](n(273)).to(this,n(259)),this[n(262)](this[n(270)][n(258)],n(267),()=>{const t=n;for(const e of this[t(270)][t(258)])e[t(277)]="s";this[t(270)][t(258)][t(275)]&&(this[t(270)][t(258)][t(275)][t(277)]="se")}),this[n(263)]({tag:n(272),attributes:{class:["ck",n(268),n(255),n(257),r.if(n(259),n(266))]},children:[this[n(270)]]})}}const li=pi;function pi(t,e){const n=hi();return(pi=function(t,e){return n[t-=473]})(t,e)}function hi(){const t=["1141SUXfxR","140510xSmhGq","setTemplate",".ck-balloon-panel_with-arrow","contains","ck-presence-list__dropdown-list","2860113wuWuSI","ariaLabelledBy","774cSIMVw","351SahCPU","19770wZAMVG","Connected users list dropdown menu","max","resize","relatedTarget","fire","presencelist:hide","listWrapperView","checkIfScrollable","2WGQxSN","window","_isScrollable","577850vHLBjS","ck-reset","set","div","items","clientHeight","ck-presence-list__dropdown-list-wrapper_scrollable","4520728veahPC","listenTo","element","innerHeight","application","querySelector","change","scrollHeight",".ck-presence-list__list","1167244ZVuAwK","ariaLabel","ck-list","role","render","bindTemplate","ck-presence-list__dropdown-list-wrapper"];return(hi=function(){return t})()}!function(t){const e=pi,n=t();for(;;)try{if(607887===parseInt(e(486))/1+-parseInt(e(495))/2*(parseInt(e(482))/3)+parseInt(e(514))/4+parseInt(e(498))/5+-parseInt(e(484))/6*(-parseInt(e(476))/7)+parseInt(e(505))/8+-parseInt(e(485))/9*(-parseInt(e(477))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(hi);class fi extends r.View{[li(493)];constructor(t,e){const n=li;super(t);const r=this[n(474)];this[n(493)]=new mi(t,e),this[n(478)]({tag:n(501),attributes:{tabindex:-1,role:n(509),class:["ck",n(481)],"aria-label":mr(t,n(487))},children:[this[n(493)]],on:{mouseleave:r.to(t=>{const e=n,r=t,s=document[e(510)](e(513)),o=document[e(510)](e(479));s?.[e(480)](r[e(490)])||o?.[e(480)](r[e(490)])||this[e(491)](e(492))})}})}}class mi extends r.ListView{constructor(t,e){const r=li;super(t);const s=this[r(474)];this[r(500)](r(497),!1),this[r(478)]({tag:e?r(501):"ul",attributes:{class:["ck",r(499),r(516),r(475),s.if(r(497),r(504))],role:s.to(r(517)),"aria-label":s.to(r(515)),"aria-labelledby":s.to(r(483))},children:this[r(502)]}),this[r(506)](n.global[r(496)],r(489),()=>this[r(494)]()),this[r(502)].on(r(511),()=>this[r(494)]())}[li(473)](){const t=li;super[t(473)](),this[t(494)]()}[li(494)](){const t=li,e=this[t(507)];e&&(this[t(497)]=Math[t(488)](e[t(512)],e[t(503)])>.8*window[t(508)])}}function yi(){const t=["153560nZuPEN","bindTemplate","element","162742ubRzHP","presentation","execute","ck-presence-list__marker","userView","ck-presence-list__dropdown-list-item","1658460HPBcbn","2FCvbAb","focus","835832pvzscC","name","fire","114uRWKPX","true","setTemplate","button","1256454ntvHcM","getBackgroundColorClass","1953933WJmtPb","tag","color","77bnSzFM","597130BfeGCF","ck-user__full-name","span"];return(yi=function(){return t})()}const gi=bi;function bi(t,e){const n=yi();return(bi=function(t,e){return n[t-=249]})(t,e)}!function(t){const e=bi,n=t();for(;;)try{if(719588===-parseInt(e(265))/1*(parseInt(e(272))/2)+parseInt(e(255))/3+-parseInt(e(271))/4+parseInt(e(262))/5*(-parseInt(e(249))/6)+parseInt(e(258))/7*(parseInt(e(274))/8)+parseInt(e(253))/9+-parseInt(e(259))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(yi);class Ii extends r.ListItemView{[gi(269)];constructor(t,e,n){const r=gi;super(t);const s=this[r(263)];this[r(269)]=new Fn.UserView(t,e);const o={tag:"li",attributes:{class:["ck",r(270)],tabindex:-1,role:r(266),"aria-label":e[r(275)]},children:[this[r(269)],{tag:r(261),attributes:{class:["ck",r(260)]},children:[{text:e[r(275)]}]},{tag:r(261),attributes:{class:["ck",r(268),e[r(257)][r(254)]()],"aria-hidden":r(250)}}]};n&&(o[r(256)]=r(252),o.on={click:s.to(()=>this[r(276)](r(267)))}),this[r(251)](o)}[gi(273)](){const t=gi;this[t(264)][t(273)]()}}const Oi=Si;!function(t){const e=Si,n=t();for(;;)try{if(143608===parseInt(e(119))/1*(-parseInt(e(134))/2)+-parseInt(e(146))/3*(-parseInt(e(123))/4)+parseInt(e(140))/5*(parseInt(e(148))/6)+parseInt(e(139))/7*(-parseInt(e(135))/8)+parseInt(e(138))/9*(-parseInt(e(132))/10)+-parseInt(e(149))/11*(-parseInt(e(127))/12)+parseInt(e(142))/13)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(wi);class vi extends r.View{[Oi(114)];[Oi(141)];constructor(t,e,n){const s=Oi;super(t);const o=this[s(121)];this[s(129)](s(143),!1),this[s(129)](s(133),!0),this[s(129)](s(131),""),this[s(114)]=new Fn.UserView(t,e),this[s(141)]=new ki(t,e);const i=new r.LabelView(t);i[s(113)][s(136)]=s(115),i[s(125)]=e[s(126)];const a={tag:s(124),attributes:{class:["ck",s(144)],role:s(122),tabindex:o.to(s(143),t=>!!t&&0),"aria-labelledby":i.id,"data-cke-tooltip-text":this[s(114)][s(126)],"data-cke-tooltip-position":o.to(s(131)),"data-cke-tooltip-disabled":o.to(s(133),t=>!t),"data-cke-tooltip-class":s(147)},children:[this[s(114)],this[s(141)],i]};n&&(a[s(136)]=s(137),a.on={click:o.to(()=>this[s(130)](s(118)))}),this[s(120)](a)}}function wi(){const t=["span","ck-presence-list__marker","true","execute","268971zOFyAK","setTemplate","bindTemplate","listitem","32lbjxSt","div","text","name","12RhPolM","color","set","fire","tooltipPosition","257610rGSwde","hasTooltip","2uUekQs","8NTcaPJ","tag","button","63yMnAZF","1181229yMUWeg","30hcvFfh","markerView","4543851eDWisP","isFocusable","ck-presence-list__list-item","getBackgroundColorClass","40617gJyjrJ","ck-presence-list__list-item__tooltip","66102XkVoyA","2614832dzkYJr","template","userView"];return(wi=function(){return t})()}function Si(t,e){const n=wi();return(Si=function(t,e){return n[t-=113]})(t,e)}class ki extends r.View{constructor(t,e){const n=Oi;super(t),this[n(120)]({tag:n(115),attributes:{class:["ck",n(116),e[n(128)][n(145)]()],"aria-hidden":n(117)}})}}const Ai=Ci;function Ti(){const t=[':not([disabled]):not([tabindex="-1"])',"find","isVisible","displayMe","offsetHeight","presenceDropdownView","define","length","isExpanded","isCollapsed","onClick","hasTooltip","plugins","presencelist-collapseat-invalid-format","Shift+Tab","destroy","265712rAieoz","focusTracker","render","number","bindTo","isPremiumPlugin","_bodyCollection","filter","presenceList","activeElement","get","Esc","_handleUserAdd","select","_handleUserRemove","PresenceListUI","isOfficialPlugin","counterView","using","presencelist:hide","indexOf","querySelectorAll","presenceList.collapseAt","execute","ck ck-presence-list__balloon","presencelist-missing-container","input","sort","reverse","join","add","content","40RQuAOe","appendChild","min","Tab","isFocusable","keystrokes","20OQcCGr","presencelist:show","change:isFocused","bind","currentDisplayedUsers","unpin","balloonPanelView","from","init","inlineListView","presenceList.displayMe","allConnectedUsers","_allConnectedUsers","set","3263414xCXEEJ","remove","732555vSYyJT","32766xFIWdN","pin","isMe","90Uzmmoq","checkIfScrollable","listenTo","detachFromDom","context","config","[contenteditable]","[tabindex]","hideDropdown","body","4240024WabIpo","element","usersCount","attachToDom","Enter","presenceList.container","class","locale","_createView","view","offsetWidth","163658cJZAMN","pluginName","tabIndex","showDropdown","requires","button","textarea","focus","map","isRendered","2591094rJgPRJ","items"];return(Ti=function(){return t})()}!function(t){const e=Ci,n=t();for(;;)try{if(354768===-parseInt(e(422))/1+-parseInt(e(398))/2*(-parseInt(e(401))/3)+parseInt(e(343))/4*(parseInt(e(381))/5)+parseInt(e(325))/6+-parseInt(e(395))/7+-parseInt(e(411))/8+parseInt(e(397))/9*(parseInt(e(375))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ti);const _i={collapseAt:6,displayMe:!0};function Ci(t,e){const n=Ti();return(Ci=function(t,e){return n[t-=321]})(t,e)}class Pi extends e.ContextPlugin{[Ai(385)];[Ai(387)];[Ai(420)];[Ai(332)];[Ai(349)]=null;static get[Ai(423)](){return Ai(358)}static get[Ai(359)](){return!0}static get[Ai(348)](){return!0}constructor(t){const e=Ai;super(t),this[e(405)][e(406)][e(333)](e(351),_i);const s=t[e(406)][e(353)](e(365));if(e(346)!=typeof s)throw new n.CKEditorError(e(340),this);if(s<1)throw new n.CKEditorError(e(340),this);this[e(393)]=this[e(405)][e(339)][e(353)](Qn)[e(392)],this[e(394)](e(413),0),this[e(385)]=new n.Collection,this[e(387)]=new r.BalloonPanelView,this[e(387)][e(417)]=e(367),this[e(420)]=this[e(419)](),this[e(332)]=void 0}static get[Ai(426)](){return[Qn]}[Ai(389)](){const t=Ai;for(const e of this[t(393)])this[t(355)](e);this[t(403)](this[t(393)],t(373),(e,n)=>{this[t(355)](n)}),this[t(403)](this[t(393)],t(396),(e,n)=>{this[t(357)](n)})}[Ai(419)](){const t=Ai,e=this[t(405)],s=new di(this[t(405)][t(418)],this[t(405)][t(406)][t(353)](t(365))),o=this[t(387)];if(!Qo(e[t(406)][t(353)](t(416))))throw new n.CKEditorError(t(368),this);return s[t(360)][t(384)](t(413)).to(this),s[t(384)](t(336)).to(this,t(413),n=>{const r=t,{collapseAt:o}=e[r(406)][r(353)](r(351)),i=n>=o;if(i&&!s[r(390)][r(326)][r(328)](t=>t instanceof ti)){const t=this[r(405)][r(406)][r(353)](r(365))-1;this[r(385)][r(334)]==t&&this[r(385)][r(334)]>1&&this[r(385)][r(396)](this[r(385)][r(334)]-1),s[r(390)][r(326)][r(373)](s[r(360)])}return i||this[r(409)](),i}),s[t(390)][t(326)][t(347)](this[t(385)])[t(361)](n=>{const r=t,o=e[r(406)][r(353)](r(351)),i=new vi(e[r(418)],n,!!o[r(337)]);return i[r(384)](r(338)).to(s,r(336),t=>!t),i[r(384)](r(379)).to(s,r(336),t=>!t),o[r(337)]&&this[r(403)](i,r(366),()=>{const t=r;this[t(420)][t(336)]||o[t(337)](n,i[t(412)])}),i}),this[t(403)](s[t(390)],t(382),()=>{const e=t;this[e(420)][e(336)]&&this[e(425)]()}),this[t(403)](s[t(390)],t(362),()=>{const e=t;this[e(332)]&&this[e(409)]()}),s[t(390)][t(380)][t(394)](t(415),(e,n)=>{const r=t;this[r(420)][r(336)]&&(this[r(425)](),n())}),s[t(345)](),o[t(345)](),(0,r.clickOutsideHandler)({emitter:s,activator:()=>o[t(329)],contextElements:[o[t(412)],s[t(390)][t(412)]],callback:()=>this[t(409)]()}),e[t(406)][t(353)](t(416))[t(376)](s[t(412)]),this[t(349)]=new r.BodyCollection(this[t(405)][t(418)]),this[t(349)][t(414)](),this[t(349)][t(373)](this[t(387)]),s}[Ai(355)](t){const e=Ai;if(!this[e(405)][e(406)][e(353)](e(391))&&t[e(400)])return;const n=this[e(405)][e(406)][e(353)](e(365))-1;for(this[e(413)]++;this[e(385)][e(334)]>=n-(this[e(420)][e(336)]?1:0)&&this[e(385)][e(334)]>1;)this[e(385)][e(396)](1);const r=t[e(400)]?0:this[e(385)][e(334)];this[e(385)][e(373)](t,r)}[Ai(357)](t){const e=Ai;this[e(413)]--;const{collapseAt:n}=this[e(405)][e(406)][e(353)](e(351)),r=this[e(413)]>=n;if(this[e(385)][e(353)](t.id))this[e(385)][e(396)](t.id);else if(r&&this[e(385)][e(334)]+1===n-1)return;if(this[e(385)][e(334)]+(r?1:0)<this[e(413)])for(const t of Array[e(388)](this[e(393)])[e(371)]())if(!this[e(385)][e(353)](t.id)&&(this[e(385)][e(373)](t,Math[e(377)](this[e(385)][e(334)]-(r?1:0),1)),this[e(385)][e(334)]+(r?1:0)===n-1))return}[Ai(425)](){const t=Ai;if(this[t(332)])return;const e=this[t(405)][t(406)][t(353)](t(351));this[t(332)]=new fi(this[t(405)][t(418)],!!e[t(337)]),this[t(420)][t(390)][t(335)]=!0,this[t(403)](this[t(332)],t(362),()=>{const e=t;this[e(332)]&&this[e(409)]()});const{listWrapperView:n}=this[t(332)];n[t(326)][t(347)](this[t(393)])[t(361)](n=>{const r=t;if(!e[r(330)]&&n[r(400)])return null;const s=new Ii(this[r(405)][r(418)],n,!!e[r(337)]);return e[r(337)]&&this[r(403)](s,r(366),()=>{const t=r;e[t(337)](n,s[t(412)])}),s}),this[t(387)][t(374)][t(373)](this[t(332)]),this[t(387)][t(399)]({target:this[t(420)][t(390)][t(412)]}),n[t(322)](),n[t(402)]();const r=(e,n)=>{const r=t;this[r(409)](),this[r(420)][r(390)][r(322)](),n()};n[t(380)][t(394)](t(354),r),n[t(380)][t(394)](t(341),r),n[t(380)][t(394)](t(378),(e,n)=>{const r=t;!function(t){const e=Ci,n=["a",e(427),e(369),e(356),e(321),e(408),e(407)][e(323)](t=>t+e(327))[e(372)](","),r=[...document[e(410)][e(364)](n)][e(350)](t=>t===document[e(352)]||t[e(421)]+t[e(331)]>0)[e(370)]((t,n)=>(t[e(424)]||0)-(n[e(424)]||0)),s=r[e(363)](t),o=r[(s+1)%r[e(334)]];o&&o[e(322)]()}(this[r(420)][r(412)]),this[r(409)](),n()}),n[t(344)][t(373)](this[t(420)][t(412)]),n[t(344)].on(t(383),(e,n,r)=>{r||this[t(409)]()})}[Ai(409)](){const t=Ai;this[t(332)]&&(this[t(420)][t(390)][t(335)]=!1,this[t(387)][t(386)](),this[t(387)][t(374)][t(396)](this[t(332)]),this[t(332)][t(342)](),this[t(332)]=void 0)}[Ai(342)](){const t=Ai;super[t(342)](),this[t(420)]&&this[t(420)][t(324)]&&this[t(420)][t(342)](),this[t(349)]&&(this[t(349)][t(404)](),this[t(349)][t(342)](),this[t(349)]=null)}}var Ei=ji;function ji(t,e){var n=Di();return(ji=function(t,e){return n[t-=413]})(t,e)}function Di(){var t=["851104HPHuuM","isOfficialPlugin","PresenceList","59645vFaODj","291646oAbPBd","2586438vzsUaI","isPremiumPlugin","2821488hNITSp","16zlbOEg","376734UCxuHd","pluginName","requires","3OZBPqk","54278sxHgai"];return(Di=function(){return t})()}!function(t){for(var e=ji,n=t();;)try{if(317522===-parseInt(e(423))/1+parseInt(e(418))/2+-parseInt(e(426))/3*(parseInt(e(414))/4)+-parseInt(e(417))/5+parseInt(e(421))/6+-parseInt(e(413))/7*(-parseInt(e(422))/8)+parseInt(e(419))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Di);class xi extends e.ContextPlugin{static get[Ei(425)](){return[Qn,Pi]}static get[Ei(424)](){return Ei(416)}static get[Ei(415)](){return!0}static get[Ei(420)](){return!0}}function Ri(){var t=["6Zfzvuw","21400VZZgTA","186147OYiNic","139488DHkyoQ","734825QZUZbp","29881ousGgz","2641243RMCVXA","280icvvkq","1503909NfFhJo","4MDuPUZ","10xeHLPa"];return(Ri=function(){return t})()}function Ni(t,e){var n=Ri();return(Ni=function(t,e){return n[t-=120]})(t,e)}!function(t){for(var e=Ni,n=t();;)try{if(102407===parseInt(e(125))/1*(-parseInt(e(120))/2)+parseInt(e(122))/3+-parseInt(e(129))/4*(parseInt(e(124))/5)+-parseInt(e(123))/6+parseInt(e(127))/7*(-parseInt(e(121))/8)+parseInt(e(128))/9+-parseInt(e(130))/10*(-parseInt(e(126))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ri)})(),(window.CKEditor5=window.CKEditor5||{}).realTimeCollaboration=__webpack_exports__})();
5
+ */(()=>{var __webpack_modules__={2:(t,e,n)=>{"use strict";e.Service=n(626)},4:(t,e)=>{"use strict";var n=e;n.length=function(t){var e=t.length;if(!e)return 0;for(var n=0;--e%4>1&&"="===t.charAt(e);)++n;return Math.ceil(3*t.length)/4-n};for(var r=new Array(64),s=new Array(123),o=0;o<64;)s[r[o]=o<26?o+65:o<52?o+71:o<62?o-4:o-59|43]=o++;n.encode=function(t,e,n){for(var s,o=null,i=[],a=0,c=0;e<n;){var u=t[e++];switch(c){case 0:i[a++]=r[u>>2],s=(3&u)<<4,c=1;break;case 1:i[a++]=r[s|u>>4],s=(15&u)<<2,c=2;break;case 2:i[a++]=r[s|u>>6],i[a++]=r[63&u],c=0}a>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,i)),a=0)}return c&&(i[a++]=r[s],i[a++]=61,1===c&&(i[a++]=61)),o?(a&&o.push(String.fromCharCode.apply(String,i.slice(0,a))),o.join("")):String.fromCharCode.apply(String,i.slice(0,a))};var i="invalid encoding";n.decode=function(t,e,n){for(var r,o=n,a=0,c=0;c<t.length;){var u=t.charCodeAt(c++);if(61===u&&a>1)break;if(void 0===(u=s[u]))throw Error(i);switch(a){case 0:r=u,a=1;break;case 1:e[n++]=r<<2|(48&u)>>4,r=u,a=2;break;case 2:e[n++]=(15&r)<<4|(60&u)>>2,r=u,a=3;break;case 3:e[n++]=(3&r)<<6|u,a=0}}if(1===a)throw Error(i);return n-o},n.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}},6:t=>{"use strict";var e=[];function n(t){for(var n=-1,r=0;r<e.length;r++)if(e[r].identifier===t){n=r;break}return n}function r(t,r){for(var o={},i=[],a=0;a<t.length;a++){var c=t[a],u=r.base?c[0]+r.base:c[0],d=o[u]||0,l="".concat(u," ").concat(d);o[u]=d+1;var p=n(l),h={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==p)e[p].references++,e[p].updater(h);else{var f=s(h,r);r.byIndex=a,e.splice(a,0,{identifier:l,updater:f,references:1})}i.push(l)}return i}function s(t,e){var n=e.domAPI(e);n.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,s){var o=r(t=t||[],s=s||{});return function(t){t=t||[];for(var i=0;i<o.length;i++){var a=n(o[i]);e[a].references--}for(var c=r(t,s),u=0;u<o.length;u++){var d=n(o[u]);0===e[d].references&&(e[d].updater(),e.splice(d,1))}o=c}}},39:(t,e,n)=>{"use strict";t.exports=n(779)},63:(t,e,n)=>{"use strict";t.exports=o;var r=n(982);(o.prototype=Object.create(r.prototype)).constructor=o;var s=n(641);function o(){r.call(this)}function i(t,e,n){t.length<40?s.utf8.write(t,e,n):e.utf8Write?e.utf8Write(t,n):e.write(t,n)}o._configure=function(){o.alloc=s._Buffer_allocUnsafe,o.writeBytesBuffer=s.Buffer&&s.Buffer.prototype instanceof Uint8Array&&"set"===s.Buffer.prototype.set.name?function(t,e,n){e.set(t,n)}:function(t,e,n){if(t.copy)t.copy(e,n,0,t.length);else for(var r=0;r<t.length;)e[n++]=t[r++]}},o.prototype.bytes=function(t){s.isString(t)&&(t=s._Buffer_from(t,"base64"));var e=t.length>>>0;return this.uint32(e),e&&this._push(o.writeBytesBuffer,e,t),this},o.prototype.string=function(t){var e=s.Buffer.byteLength(t);return this.uint32(e),e&&this._push(i,e,t),this},o._configure()},117:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(933),s=n.n(r),o=n(718),i=n.n(o)()(s());i.push([t.id,".ck .ck-user__marker-dot{border-radius:50%;cursor:default;display:block;height:var(--ck-user-dot-size);left:50%;position:absolute;top:calc((var(--ck-user-dot-size)/2)*-1);transform:translate(-50%,-50%);width:var(--ck-user-dot-size)}.ck .ck-user__marker-tooltip{color:#fff;display:none;font-family:Georgia,sans-serif;font-size:var(--ck-font-size-base);font-style:normal;font-weight:400;left:0;line-height:1;opacity:0;padding:var(--ck-spacing-small);position:absolute;top:-20px;transition:opacity .2s linear,transform .3s ease-in-out;white-space:nowrap;z-index:99999}@media (prefers-reduced-motion:reduce){.ck .ck-user__marker-tooltip{transition:none}}.ck .ck-user__marker-line{bottom:0;height:100%;position:absolute;width:0}.ck .ck-user__marker{cursor:default;display:inline;position:relative}.ck .ck-user__marker.ck-user__marker_hovered .ck-user__marker-dot{width:0}.ck .ck-user__marker.ck-user__marker_hovered .ck-user__marker-tooltip{animation:fadeInLeft .3s ease-in-out;display:block;opacity:1}.ck .ck-placeholder .ck-user__marker{display:none}@media (prefers-reduced-motion:reduce){.ck .ck-user__marker,.ck .ck-user__marker *,.ck .ck-user__marker:after{animation:none!important}}@keyframes fadeInLeft{0%{opacity:0;transform:translateX(-10px)}to{opacity:1;transform:translateX(0)}}",""]);const a=i},144:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(933),s=n.n(r),o=n(718),i=n.n(o)()(s());i.push([t.id,'.ck.ck-balloon-panel.ck-tooltip{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;z-index:calc(var(--ck-z-dialog) + 100)}:root{--ck-color-presence-list-dropdown-background:#fff;--ck-color-presence-list-dropdown-arrow-border:#ebebeb;--ck-presence-list-dropdown-list-max-width:250px;--ck-presence-list-dropdown-list-min-width:180px;--ck-presence-list-users-tooltip-max-width:120px;--ck-presence-list-users-tooltip-min-width:25px}.ck.ck-presence-list{align-items:center;display:inline-flex;font-size:var(--ck-font-size-base);margin-right:var(--ck-spacing-standard);transition:margin-right .2s ease-in-out}.ck.ck-presence-list *{box-sizing:border-box}.ck.ck-presence-list__list{display:flex;flex-direction:row;justify-content:flex-end;position:relative}.ck.ck-presence-list__list:after{background:transparent;bottom:-15px;content:"";height:15px;left:0;position:absolute;width:100%}.ck.ck-presence-list__counter--hidden{display:none}.ck.ck-presence-list__list-item{background:none;border:1px solid transparent;color:inherit;font:inherit;margin-left:var(--ck-spacing-medium);outline:none;padding:0;position:relative}.ck.ck-presence-list__list-item:focus{border:var(--ck-focus-ring);border-radius:0;box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck-rounded-corners .ck.ck-presence-list__list-item:focus,.ck.ck-presence-list__list-item.ck-rounded-corners:focus{border-radius:var(--ck-border-radius)}.ck.ck-presence-list__list-item .ck-label{height:0;overflow:hidden;width:0}.ck.ck-presence-list__list-item:first-child{margin-left:0}.ck.ck-tooltip.ck-presence-list__list-item__tooltip>.ck-tooltip__text{display:inline-block;max-width:var(--ck-presence-list-users-tooltip-max-width);overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap}.ck.ck-presence-list__marker{display:block;height:3px;margin-top:5px;position:relative;width:100%}.ck-presence-list__balloon button.ck-presence-list__dropdown-list-item *,.ck-presence-list__list button.ck-presence-list__list-item *{cursor:pointer}.ck.ck-presence-list--collapsed .ck-presence-list__list{border:1px solid transparent;min-width:calc(var(--ck-user-avatar-size)*2);padding-left:1px}.ck.ck-presence-list--collapsed .ck-presence-list__list *{cursor:pointer;transition:all .4s ease-in-out}.ck.ck-presence-list--collapsed .ck-presence-list__list:focus{border:var(--ck-focus-ring);border-radius:0;box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck-rounded-corners .ck.ck-presence-list--collapsed .ck-presence-list__list:focus,.ck.ck-presence-list--collapsed .ck-presence-list__list.ck-rounded-corners:focus{border-radius:var(--ck-border-radius)}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item{border:0;margin-left:calc(var(--ck-user-avatar-size)*-.35);padding:0}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item:first-child{margin-left:0}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item:last-child{order:unset}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item .ck-user{--ck-presence-list-avatar-border-color:var(--ck-color-base-foreground);border:2px solid var(--ck-presence-list-avatar-border-color);margin-left:0;margin-right:0}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item.ck-presence-list__users-counter{margin-left:0;margin-right:0}.ck.ck-presence-list__balloon{--ck-color-panel-border:var(--ck-color-presence-list-dropdown-arrow-border);--ck-color-panel-background:var(--ck-color-presence-list-dropdown-background);animation:fadeIn .3s ease-in-out;background-color:var(--ck-color-presence-list-dropdown-background);border:0;opacity:1}@media (prefers-reduced-motion:reduce){.ck.ck-presence-list__balloon{animation:none}}.ck.ck-presence-list__balloon ul{background-color:var(--ck-color-presence-list-dropdown-background)}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-wrapper{border-radius:var(--ck-border-radius);max-width:var(--ck-presence-list-dropdown-list-max-width);min-width:var(--ck-presence-list-dropdown-list-min-width)}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-wrapper.ck-presence-list__dropdown-list-wrapper_scrollable{max-height:80vh;overflow-x:hidden;overflow-y:auto}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-item{align-items:center;background:none;border:0;color:inherit;display:flex;font:inherit;outline:none;padding:var(--ck-spacing-standard);position:relative}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-item:focus{box-shadow:var(--ck-focus-outer-shadow),0 0;outline:var(--ck-focus-ring);outline-offset:-1px;position:relative;z-index:1}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-item:first-of-type .ck-presence-list__marker{border-top-left-radius:var(--ck-border-radius)}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-item:last-of-type .ck-presence-list__marker{border-bottom-left-radius:var(--ck-border-radius)}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list .ck-user__full-name{color:var(--ck-color-base-text);margin-left:var(--ck-spacing-standard);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list .ck.ck-presence-list__marker{height:100%;left:0;margin:0;position:absolute;width:3px}.ck.ck-presence-list__users-counter{--ck-presence-list-counter-border-color:var(--ck-user-avatar-background);--ck-presence-list-counter-background-color:var(--ck-user-avatar-color);align-items:center;background-color:var(--ck-presence-list-counter-background-color);border:2px solid var(--ck-presence-list-counter-border-color);border-radius:50%;box-sizing:border-box;display:flex;height:calc(var(--ck-user-avatar-size) - 4px);justify-content:center;line-height:100%;margin:4px 2px 2px;position:relative;width:calc(var(--ck-user-avatar-size) - 4px)}.ck.ck-presence-list__users-counter__text{--ck-presence-list-counter-text-color:var(--ck-user-avatar-background);color:var(--ck-presence-list-counter-text-color);cursor:default;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}',""]);const a=i},188:t=>{"use strict";t.exports=function(t,e){var n=new Array(arguments.length-1),r=0,s=2,o=!0;for(;s<arguments.length;)n[r++]=arguments[s++];return new Promise(function(s,i){n[r]=function(t){if(o)if(o=!1,t)i(t);else{for(var e=new Array(arguments.length-1),n=0;n<e.length;)e[n++]=arguments[n];s.apply(null,e)}};try{t.apply(e||null,n)}catch(t){o&&(o=!1,i(t))}})}},204:t=>{"use strict";t.exports={}},211:(t,e,n)=>{t.exports=n(312)("./src/collaboration-core.js")},237:t=>{"use strict";t.exports=CKEditor5.dll},290:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},302:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}},311:(t,e,n)=>{t.exports=n(237)("./src/ui.js")},312:t=>{"use strict";t.exports=CKEditor5.collaborationDll},322:(t,e)=>{"use strict";var n=e;n.length=function(t){for(var e=0,n=0,r=0;r<t.length;++r)(n=t.charCodeAt(r))<128?e+=1:n<2048?e+=2:55296==(64512&n)&&56320==(64512&t.charCodeAt(r+1))?(++r,e+=4):e+=3;return e},n.read=function(t,e,n){if(n-e<1)return"";for(var r,s=null,o=[],i=0;e<n;)(r=t[e++])<128?o[i++]=r:r>191&&r<224?o[i++]=(31&r)<<6|63&t[e++]:r>239&&r<365?(r=((7&r)<<18|(63&t[e++])<<12|(63&t[e++])<<6|63&t[e++])-65536,o[i++]=55296+(r>>10),o[i++]=56320+(1023&r)):o[i++]=(15&r)<<12|(63&t[e++])<<6|63&t[e++],i>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,o)),i=0);return s?(i&&s.push(String.fromCharCode.apply(String,o.slice(0,i))),s.join("")):String.fromCharCode.apply(String,o.slice(0,i))},n.write=function(t,e,n){for(var r,s,o=n,i=0;i<t.length;++i)(r=t.charCodeAt(i))<128?e[n++]=r:r<2048?(e[n++]=r>>6|192,e[n++]=63&r|128):55296==(64512&r)&&56320==(64512&(s=t.charCodeAt(i+1)))?(r=65536+((1023&r)<<10)+(1023&s),++i,e[n++]=r>>18|240,e[n++]=r>>12&63|128,e[n++]=r>>6&63|128,e[n++]=63&r|128):(e[n++]=r>>12|224,e[n++]=r>>6&63|128,e[n++]=63&r|128);return n-o}},337:(t,e,n)=>{"use strict";var r=n(995),s=n(682),o=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,i=/[\n\r\t]/g,a=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,c=/:\d+$/,u=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,d=/^[a-zA-Z]:/;function l(t){return(t||"").toString().replace(o,"")}var p=[["#","hash"],["?","query"],function(t,e){return m(e.protocol)?t.replace(/\\/g,"/"):t},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],h={hash:1,query:1};function f(t){var e,r=("undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}).location||{},s={},o=typeof(t=t||r);if("blob:"===t.protocol)s=new y(unescape(t.pathname),{});else if("string"===o)for(e in s=new y(t,{}),h)delete s[e];else if("object"===o){for(e in t)e in h||(s[e]=t[e]);void 0===s.slashes&&(s.slashes=a.test(t.href))}return s}function m(t){return"file:"===t||"ftp:"===t||"http:"===t||"https:"===t||"ws:"===t||"wss:"===t}function g(t,e){t=(t=l(t)).replace(i,""),e=e||{};var n,r=u.exec(t),s=r[1]?r[1].toLowerCase():"",o=!!r[2],a=!!r[3],c=0;return o?a?(n=r[2]+r[3]+r[4],c=r[2].length+r[3].length):(n=r[2]+r[4],c=r[2].length):a?(n=r[3]+r[4],c=r[3].length):n=r[4],"file:"===s?c>=2&&(n=n.slice(2)):m(s)?n=r[4]:s?o&&(n=n.slice(2)):c>=2&&m(e.protocol)&&(n=r[4]),{protocol:s,slashes:o||m(s),slashesCount:c,rest:n}}function y(t,e,n){if(t=(t=l(t)).replace(i,""),!(this instanceof y))return new y(t,e,n);var o,a,c,u,h,b,I=p.slice(),O=typeof e,v=this,w=0;for("object"!==O&&"string"!==O&&(n=e,e=null),n&&"function"!=typeof n&&(n=s.parse),o=!(a=g(t||"",e=f(e))).protocol&&!a.slashes,v.slashes=a.slashes||o&&e.slashes,v.protocol=a.protocol||e.protocol||"",t=a.rest,("file:"===a.protocol&&(2!==a.slashesCount||d.test(t))||!a.slashes&&(a.protocol||a.slashesCount<2||!m(v.protocol)))&&(I[3]=[/(.*)/,"pathname"]);w<I.length;w++)"function"!=typeof(u=I[w])?(c=u[0],b=u[1],c!=c?v[b]=t:"string"==typeof c?~(h="@"===c?t.lastIndexOf(c):t.indexOf(c))&&("number"==typeof u[2]?(v[b]=t.slice(0,h),t=t.slice(h+u[2])):(v[b]=t.slice(h),t=t.slice(0,h))):(h=c.exec(t))&&(v[b]=h[1],t=t.slice(0,h.index)),v[b]=v[b]||o&&u[3]&&e[b]||"",u[4]&&(v[b]=v[b].toLowerCase())):t=u(t,v);n&&(v.query=n(v.query)),o&&e.slashes&&"/"!==v.pathname.charAt(0)&&(""!==v.pathname||""!==e.pathname)&&(v.pathname=function(t,e){if(""===t)return e;for(var n=(e||"/").split("/").slice(0,-1).concat(t.split("/")),r=n.length,s=n[r-1],o=!1,i=0;r--;)"."===n[r]?n.splice(r,1):".."===n[r]?(n.splice(r,1),i++):i&&(0===r&&(o=!0),n.splice(r,1),i--);return o&&n.unshift(""),"."!==s&&".."!==s||n.push(""),n.join("/")}(v.pathname,e.pathname)),"/"!==v.pathname.charAt(0)&&m(v.protocol)&&(v.pathname="/"+v.pathname),r(v.port,v.protocol)||(v.host=v.hostname,v.port=""),v.username=v.password="",v.auth&&(~(h=v.auth.indexOf(":"))?(v.username=v.auth.slice(0,h),v.username=encodeURIComponent(decodeURIComponent(v.username)),v.password=v.auth.slice(h+1),v.password=encodeURIComponent(decodeURIComponent(v.password))):v.username=encodeURIComponent(decodeURIComponent(v.auth)),v.auth=v.password?v.username+":"+v.password:v.username),v.origin="file:"!==v.protocol&&m(v.protocol)&&v.host?v.protocol+"//"+v.host:"null",v.href=v.toString()}y.prototype={set:function(t,e,n){var o=this;switch(t){case"query":"string"==typeof e&&e.length&&(e=(n||s.parse)(e)),o[t]=e;break;case"port":o[t]=e,r(e,o.protocol)?e&&(o.host=o.hostname+":"+e):(o.host=o.hostname,o[t]="");break;case"hostname":o[t]=e,o.port&&(e+=":"+o.port),o.host=e;break;case"host":o[t]=e,c.test(e)?(e=e.split(":"),o.port=e.pop(),o.hostname=e.join(":")):(o.hostname=e,o.port="");break;case"protocol":o.protocol=e.toLowerCase(),o.slashes=!n;break;case"pathname":case"hash":if(e){var i="pathname"===t?"/":"#";o[t]=e.charAt(0)!==i?i+e:e}else o[t]=e;break;case"username":case"password":o[t]=encodeURIComponent(e);break;case"auth":var a=e.indexOf(":");~a?(o.username=e.slice(0,a),o.username=encodeURIComponent(decodeURIComponent(o.username)),o.password=e.slice(a+1),o.password=encodeURIComponent(decodeURIComponent(o.password))):o.username=encodeURIComponent(decodeURIComponent(e))}for(var u=0;u<p.length;u++){var d=p[u];d[4]&&(o[d[1]]=o[d[1]].toLowerCase())}return o.auth=o.password?o.username+":"+o.password:o.username,o.origin="file:"!==o.protocol&&m(o.protocol)&&o.host?o.protocol+"//"+o.host:"null",o.href=o.toString(),o},toString:function(t){t&&"function"==typeof t||(t=s.stringify);var e,n=this,r=n.host,o=n.protocol;o&&":"!==o.charAt(o.length-1)&&(o+=":");var i=o+(n.protocol&&n.slashes||m(n.protocol)?"//":"");return n.username?(i+=n.username,n.password&&(i+=":"+n.password),i+="@"):n.password?(i+=":"+n.password,i+="@"):"file:"!==n.protocol&&m(n.protocol)&&!r&&"/"!==n.pathname&&(i+="@"),(":"===r[r.length-1]||c.test(n.hostname)&&!n.port)&&(r+=":"),i+=r+n.pathname,(e="object"==typeof n.query?t(n.query):n.query)&&(i+="?"!==e.charAt(0)?"?"+e:e),n.hash&&(i+=n.hash),i}},y.extractProtocol=g,y.location=f,y.trimLeft=l,y.qs=s,t.exports=y},338:t=>{"use strict";t.exports=function(t,e,n){var r=n||8192,s=r>>>1,o=null,i=r;return function(n){if(n<1||n>s)return t(n);i+n>r&&(o=t(r),i=0);var a=e.call(o,i,i+=n);return 7&i&&(i=1+(7|i)),a}}},474:(t,e,n)=>{"use strict";t.exports=s;var r=n(641);function s(t,e){this.lo=t>>>0,this.hi=e>>>0}var o=s.zero=new s(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var i=s.zeroHash="\0\0\0\0\0\0\0\0";s.fromNumber=function(t){if(0===t)return o;var e=t<0;e&&(t=-t);var n=t>>>0,r=(t-n)/4294967296>>>0;return e&&(r=~r>>>0,n=~n>>>0,++n>4294967295&&(n=0,++r>4294967295&&(r=0))),new s(n,r)},s.from=function(t){if("number"==typeof t)return s.fromNumber(t);if(r.isString(t)){if(!r.Long)return s.fromNumber(parseInt(t,10));t=r.Long.fromString(t)}return t.low||t.high?new s(t.low>>>0,t.high>>>0):o},s.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var e=1+~this.lo>>>0,n=~this.hi>>>0;return e||(n=n+1>>>0),-(e+4294967296*n)}return this.lo+4294967296*this.hi},s.prototype.toLong=function(t){return r.Long?new r.Long(0|this.lo,0|this.hi,Boolean(t)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(t)}};var a=String.prototype.charCodeAt;s.fromHash=function(t){return t===i?o:new s((a.call(t,0)|a.call(t,1)<<8|a.call(t,2)<<16|a.call(t,3)<<24)>>>0,(a.call(t,4)|a.call(t,5)<<8|a.call(t,6)<<16|a.call(t,7)<<24)>>>0)},s.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},s.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},s.prototype.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},s.prototype.length=function(){var t=this.lo,e=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0===n?0===e?t<16384?t<128?1:2:t<2097152?3:4:e<16384?e<128?5:6:e<2097152?7:8:n<128?9:10}},534:(t,e,n)=>{"use strict";t.exports=c;var r,s=n(641),o=s.LongBits,i=s.utf8;function a(t,e){return RangeError("index out of range: "+t.pos+" + "+(e||1)+" > "+t.len)}function c(t){this.buf=t,this.pos=0,this.len=t.length}var u,d="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new c(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new c(t);throw Error("illegal buffer")},l=function(){return s.Buffer?function(t){return(c.create=function(t){return s.Buffer.isBuffer(t)?new r(t):d(t)})(t)}:d};function p(){var t=new o(0,0),e=0;if(!(this.len-this.pos>4)){for(;e<3;++e){if(this.pos>=this.len)throw a(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*e)>>>0,t}for(;e<4;++e)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t;if(e=0,this.len-this.pos>4){for(;e<5;++e)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}else for(;e<5;++e){if(this.pos>=this.len)throw a(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function h(t,e){return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0}function f(){if(this.pos+8>this.len)throw a(this,8);return new o(h(this.buf,this.pos+=4),h(this.buf,this.pos+=4))}c.create=l(),c.prototype._slice=s.Array.prototype.subarray||s.Array.prototype.slice,c.prototype.uint32=(u=4294967295,function(){if(u=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return u;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return u}),c.prototype.int32=function(){return 0|this.uint32()},c.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)},c.prototype.bool=function(){return 0!==this.uint32()},c.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return h(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|h(this.buf,this.pos+=4)},c.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var t=s.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},c.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var t=s.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},c.prototype.bytes=function(){var t=this.uint32(),e=this.pos,n=this.pos+t;if(n>this.len)throw a(this,t);if(this.pos+=t,Array.isArray(this.buf))return this.buf.slice(e,n);if(e===n){var r=s.Buffer;return r?r.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,e,n)},c.prototype.string=function(){var t=this.bytes();return i.read(t,0,t.length)},c.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw a(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw a(this)}while(128&this.buf[this.pos++]);return this},c.prototype.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(t=7&this.uint32());)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},c._configure=function(t){r=t,c.create=l(),r._configure();var e=s.Long?"toLong":"toNumber";s.merge(c.prototype,{int64:function(){return p.call(this)[e](!1)},uint64:function(){return p.call(this)[e](!0)},sint64:function(){return p.call(this).zzDecode()[e](!1)},fixed64:function(){return f.call(this)[e](!0)},sfixed64:function(){return f.call(this)[e](!1)}})}},557:t=>{"use strict";var e={};t.exports=function(t,n){var r=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},584:(t,e,n)=>{t.exports=n(237)("./src/utils.js")},602:t=>{"use strict";var e,n=(e=[],function(t,n){return e[t]=n,e.filter(Boolean).join("\n")});function r(t,e,r,s){var o;if(r)o="";else{o="",s.supports&&(o+="@supports (".concat(s.supports,") {")),s.media&&(o+="@media ".concat(s.media," {"));var i=void 0!==s.layer;i&&(o+="@layer".concat(s.layer.length>0?" ".concat(s.layer):""," {")),o+=s.css,i&&(o+="}"),s.media&&(o+="}"),s.supports&&(o+="}")}if(t.styleSheet)t.styleSheet.cssText=n(e,o);else{var a=document.createTextNode(o),c=t.childNodes;c[e]&&t.removeChild(c[e]),c.length?t.insertBefore(a,c[e]):t.appendChild(a)}}var s={singleton:null,singletonCounter:0};t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=s.singletonCounter++,n=s.singleton||(s.singleton=t.insertStyleElement(t));return{update:function(t){r(n,e,!1,t)},remove:function(t){r(n,e,!0,t)}}}},626:(t,e,n)=>{"use strict";t.exports=s;var r=n(641);function s(t,e,n){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");r.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=Boolean(e),this.responseDelimited=Boolean(n)}(s.prototype=Object.create(r.EventEmitter.prototype)).constructor=s,s.prototype.rpcCall=function t(e,n,s,o,i){if(!o)throw TypeError("request must be specified");var a=this;if(!i)return r.asPromise(t,a,e,n,s,o);if(a.rpcImpl)try{return a.rpcImpl(e,n[a.requestDelimited?"encodeDelimited":"encode"](o).finish(),function(t,n){if(t)return a.emit("error",t,e),i(t);if(null!==n){if(!(n instanceof s))try{n=s[a.responseDelimited?"decodeDelimited":"decode"](n)}catch(t){return a.emit("error",t,e),i(t)}return a.emit("data",n,e),i(null,n)}a.end(!0)})}catch(t){return a.emit("error",t,e),void setTimeout(function(){i(t)},0)}else setTimeout(function(){i(Error("already ended"))},0)},s.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},641:function(t,e,n){"use strict";var r=e;function s(t,e,n){for(var r=Object.keys(e),s=0;s<r.length;++s)void 0!==t[r[s]]&&n||(t[r[s]]=e[r[s]]);return t}function o(t){function e(t,n){if(!(this instanceof e))return new e(t,n);Object.defineProperty(this,"message",{get:function(){return t}}),Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),n&&s(this,n)}return e.prototype=Object.create(Error.prototype,{constructor:{value:e,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return t},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),e}r.asPromise=n(188),r.base64=n(4),r.EventEmitter=n(730),r.float=n(791),r.inquire=n(706),r.utf8=n(322),r.pool=n(338),r.LongBits=n(474),r.isNode=Boolean(void 0!==n.g&&n.g&&n.g.process&&n.g.process.versions&&n.g.process.versions.node),r.global=r.isNode&&n.g||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,r.emptyArray=Object.freeze?Object.freeze([]):[],r.emptyObject=Object.freeze?Object.freeze({}):{},r.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},r.isString=function(t){return"string"==typeof t||t instanceof String},r.isObject=function(t){return t&&"object"==typeof t},r.isset=r.isSet=function(t,e){var n=t[e];return!(null==n||!t.hasOwnProperty(e))&&("object"!=typeof n||(Array.isArray(n)?n.length:Object.keys(n).length)>0)},r.Buffer=function(){try{var t=r.inquire("buffer").Buffer;return t.prototype.utf8Write?t:null}catch(t){return null}}(),r._Buffer_from=null,r._Buffer_allocUnsafe=null,r.newBuffer=function(t){return"number"==typeof t?r.Buffer?r._Buffer_allocUnsafe(t):new r.Array(t):r.Buffer?r._Buffer_from(t):"undefined"==typeof Uint8Array?t:new Uint8Array(t)},r.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||r.inquire("long"),r.key2Re=/^true|false|0|1$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(t){return t?r.LongBits.from(t).toHash():r.LongBits.zeroHash},r.longFromHash=function(t,e){var n=r.LongBits.fromHash(t);return r.Long?r.Long.fromBits(n.lo,n.hi,e):n.toNumber(Boolean(e))},r.merge=s,r.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)},r.newError=o,r.ProtocolError=o("ProtocolError"),r.oneOfGetter=function(t){for(var e={},n=0;n<t.length;++n)e[t[n]]=1;return function(){for(var t=Object.keys(this),n=t.length-1;n>-1;--n)if(1===e[t[n]]&&void 0!==this[t[n]]&&null!==this[t[n]])return t[n]}},r.oneOfSetter=function(t){return function(e){for(var n=0;n<t.length;++n)t[n]!==e&&delete this[t[n]]}},r.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},r._configure=function(){var t=r.Buffer;t?(r._Buffer_from=t.from!==Uint8Array.from&&t.from||function(e,n){return new t(e,n)},r._Buffer_allocUnsafe=t.allocUnsafe||function(e){return new t(e)}):r._Buffer_from=r._Buffer_allocUnsafe=null}},682:(t,e)=>{"use strict";var n=Object.prototype.hasOwnProperty;function r(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}function s(t){try{return encodeURIComponent(t)}catch(t){return null}}e.stringify=function(t,e){e=e||"";var r,o,i=[];for(o in"string"!=typeof e&&(e="?"),t)if(n.call(t,o)){if((r=t[o])||null!=r&&!isNaN(r)||(r=""),o=s(o),r=s(r),null===o||null===r)continue;i.push(o+"="+r)}return i.length?e+i.join("&"):""},e.parse=function(t){for(var e,n=/([^=?#&]+)=?([^&]*)/g,s={};e=n.exec(t);){var o=r(e[1]),i=r(e[2]);null===o||null===i||o in s||(s[o]=i)}return s}},706:module=>{"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(t){}return null}module.exports=inquire},718:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n}).join("")},e.i=function(t,n,r,s,o){"string"==typeof t&&(t=[[null,t,void 0]]);var i={};if(r)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(i[c]=!0)}for(var u=0;u<t.length;u++){var d=[].concat(t[u]);r&&i[d[0]]||(void 0!==o&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=o),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),s&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=s):d[4]="".concat(s)),e.push(d))}},e}},730:t=>{"use strict";function e(){this._listeners={}}t.exports=e,e.prototype.on=function(t,e,n){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:e,ctx:n||this}),this},e.prototype.off=function(t,e){if(void 0===t)this._listeners={};else if(void 0===e)this._listeners[t]=[];else for(var n=this._listeners[t],r=0;r<n.length;)n[r].fn===e?n.splice(r,1):++r;return this},e.prototype.emit=function(t){var e=this._listeners[t];if(e){for(var n=[],r=1;r<arguments.length;)n.push(arguments[r++]);for(r=0;r<e.length;)e[r].fn.apply(e[r++].ctx,n)}return this}},779:(t,e,n)=>{"use strict";var r=e;function s(){r.util._configure(),r.Writer._configure(r.BufferWriter),r.Reader._configure(r.BufferReader)}r.build="minimal",r.Writer=n(982),r.BufferWriter=n(63),r.Reader=n(534),r.BufferReader=n(799),r.util=n(641),r.rpc=n(2),r.roots=n(204),r.configure=s,s()},782:(t,e,n)=>{t.exports=n(237)("./src/core.js")},783:(t,e,n)=>{t.exports=n(237)("./src/engine.js")},791:t=>{"use strict";function e(t){return"undefined"!=typeof Float32Array?function(){var e=new Float32Array([-0]),n=new Uint8Array(e.buffer),r=128===n[3];function s(t,r,s){e[0]=t,r[s]=n[0],r[s+1]=n[1],r[s+2]=n[2],r[s+3]=n[3]}function o(t,r,s){e[0]=t,r[s]=n[3],r[s+1]=n[2],r[s+2]=n[1],r[s+3]=n[0]}function i(t,r){return n[0]=t[r],n[1]=t[r+1],n[2]=t[r+2],n[3]=t[r+3],e[0]}function a(t,r){return n[3]=t[r],n[2]=t[r+1],n[1]=t[r+2],n[0]=t[r+3],e[0]}t.writeFloatLE=r?s:o,t.writeFloatBE=r?o:s,t.readFloatLE=r?i:a,t.readFloatBE=r?a:i}():function(){function e(t,e,n,r){var s=e<0?1:0;if(s&&(e=-e),0===e)t(1/e>0?0:2147483648,n,r);else if(isNaN(e))t(2143289344,n,r);else if(e>34028234663852886e22)t((s<<31|2139095040)>>>0,n,r);else if(e<11754943508222875e-54)t((s<<31|Math.round(e/1401298464324817e-60))>>>0,n,r);else{var o=Math.floor(Math.log(e)/Math.LN2);t((s<<31|o+127<<23|8388607&Math.round(e*Math.pow(2,-o)*8388608))>>>0,n,r)}}function i(t,e,n){var r=t(e,n),s=2*(r>>31)+1,o=r>>>23&255,i=8388607&r;return 255===o?i?NaN:s*(1/0):0===o?1401298464324817e-60*s*i:s*Math.pow(2,o-150)*(i+8388608)}t.writeFloatLE=e.bind(null,n),t.writeFloatBE=e.bind(null,r),t.readFloatLE=i.bind(null,s),t.readFloatBE=i.bind(null,o)}(),"undefined"!=typeof Float64Array?function(){var e=new Float64Array([-0]),n=new Uint8Array(e.buffer),r=128===n[7];function s(t,r,s){e[0]=t,r[s]=n[0],r[s+1]=n[1],r[s+2]=n[2],r[s+3]=n[3],r[s+4]=n[4],r[s+5]=n[5],r[s+6]=n[6],r[s+7]=n[7]}function o(t,r,s){e[0]=t,r[s]=n[7],r[s+1]=n[6],r[s+2]=n[5],r[s+3]=n[4],r[s+4]=n[3],r[s+5]=n[2],r[s+6]=n[1],r[s+7]=n[0]}function i(t,r){return n[0]=t[r],n[1]=t[r+1],n[2]=t[r+2],n[3]=t[r+3],n[4]=t[r+4],n[5]=t[r+5],n[6]=t[r+6],n[7]=t[r+7],e[0]}function a(t,r){return n[7]=t[r],n[6]=t[r+1],n[5]=t[r+2],n[4]=t[r+3],n[3]=t[r+4],n[2]=t[r+5],n[1]=t[r+6],n[0]=t[r+7],e[0]}t.writeDoubleLE=r?s:o,t.writeDoubleBE=r?o:s,t.readDoubleLE=r?i:a,t.readDoubleBE=r?a:i}():function(){function e(t,e,n,r,s,o){var i=r<0?1:0;if(i&&(r=-r),0===r)t(0,s,o+e),t(1/r>0?0:2147483648,s,o+n);else if(isNaN(r))t(0,s,o+e),t(2146959360,s,o+n);else if(r>17976931348623157e292)t(0,s,o+e),t((i<<31|2146435072)>>>0,s,o+n);else{var a;if(r<22250738585072014e-324)t((a=r/5e-324)>>>0,s,o+e),t((i<<31|a/4294967296)>>>0,s,o+n);else{var c=Math.floor(Math.log(r)/Math.LN2);1024===c&&(c=1023),t(4503599627370496*(a=r*Math.pow(2,-c))>>>0,s,o+e),t((i<<31|c+1023<<20|1048576*a&1048575)>>>0,s,o+n)}}}function i(t,e,n,r,s){var o=t(r,s+e),i=t(r,s+n),a=2*(i>>31)+1,c=i>>>20&2047,u=4294967296*(1048575&i)+o;return 2047===c?u?NaN:a*(1/0):0===c?5e-324*a*u:a*Math.pow(2,c-1075)*(u+4503599627370496)}t.writeDoubleLE=e.bind(null,n,0,4),t.writeDoubleBE=e.bind(null,r,4,0),t.readDoubleLE=i.bind(null,s,0,4),t.readDoubleBE=i.bind(null,o,4,0)}(),t}function n(t,e,n){e[n]=255&t,e[n+1]=t>>>8&255,e[n+2]=t>>>16&255,e[n+3]=t>>>24}function r(t,e,n){e[n]=t>>>24,e[n+1]=t>>>16&255,e[n+2]=t>>>8&255,e[n+3]=255&t}function s(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0}function o(t,e){return(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}t.exports=e(e)},799:(t,e,n)=>{"use strict";t.exports=o;var r=n(534);(o.prototype=Object.create(r.prototype)).constructor=o;var s=n(641);function o(t){r.call(this,t)}o._configure=function(){s.Buffer&&(o.prototype._slice=s.Buffer.prototype.slice)},o.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))},o._configure()},933:t=>{"use strict";t.exports=function(t){return t[1]}},982:(t,e,n)=>{"use strict";t.exports=l;var r,s=n(641),o=s.LongBits,i=s.base64,a=s.utf8;function c(t,e,n){this.fn=t,this.len=e,this.next=void 0,this.val=n}function u(){}function d(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function l(){this.len=0,this.head=new c(u,0,0),this.tail=this.head,this.states=null}var p=function(){return s.Buffer?function(){return(l.create=function(){return new r})()}:function(){return new l}};function h(t,e,n){e[n]=255&t}function f(t,e){this.len=t,this.next=void 0,this.val=e}function m(t,e,n){for(;t.hi;)e[n++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)e[n++]=127&t.lo|128,t.lo=t.lo>>>7;e[n++]=t.lo}function g(t,e,n){e[n]=255&t,e[n+1]=t>>>8&255,e[n+2]=t>>>16&255,e[n+3]=t>>>24}l.create=p(),l.alloc=function(t){return new s.Array(t)},s.Array!==Array&&(l.alloc=s.pool(l.alloc,s.Array.prototype.subarray)),l.prototype._push=function(t,e,n){return this.tail=this.tail.next=new c(t,e,n),this.len+=e,this},f.prototype=Object.create(c.prototype),f.prototype.fn=function(t,e,n){for(;t>127;)e[n++]=127&t|128,t>>>=7;e[n]=t},l.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new f((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},l.prototype.int32=function(t){return t<0?this._push(m,10,o.fromNumber(t)):this.uint32(t)},l.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},l.prototype.uint64=function(t){var e=o.from(t);return this._push(m,e.length(),e)},l.prototype.int64=l.prototype.uint64,l.prototype.sint64=function(t){var e=o.from(t).zzEncode();return this._push(m,e.length(),e)},l.prototype.bool=function(t){return this._push(h,1,t?1:0)},l.prototype.fixed32=function(t){return this._push(g,4,t>>>0)},l.prototype.sfixed32=l.prototype.fixed32,l.prototype.fixed64=function(t){var e=o.from(t);return this._push(g,4,e.lo)._push(g,4,e.hi)},l.prototype.sfixed64=l.prototype.fixed64,l.prototype.float=function(t){return this._push(s.float.writeFloatLE,4,t)},l.prototype.double=function(t){return this._push(s.float.writeDoubleLE,8,t)};var y=s.Array.prototype.set?function(t,e,n){e.set(t,n)}:function(t,e,n){for(var r=0;r<t.length;++r)e[n+r]=t[r]};l.prototype.bytes=function(t){var e=t.length>>>0;if(!e)return this._push(h,1,0);if(s.isString(t)){var n=l.alloc(e=i.length(t));i.decode(t,n,0),t=n}return this.uint32(e)._push(y,e,t)},l.prototype.string=function(t){var e=a.length(t);return e?this.uint32(e)._push(a.write,e,t):this._push(h,1,0)},l.prototype.fork=function(){return this.states=new d(this),this.head=this.tail=new c(u,0,0),this.len=0,this},l.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new c(u,0,0),this.len=0),this},l.prototype.ldelim=function(){var t=this.head,e=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=t.next,this.tail=e,this.len+=n),this},l.prototype.finish=function(){for(var t=this.head.next,e=this.constructor.alloc(this.len),n=0;t;)t.fn(t.val,e,n),n+=t.len,t=t.next;return e},l._configure=function(t){r=t,l.create=p(),r._configure()}},995:t=>{"use strict";t.exports=function(t,e){if(e=e.split(":")[0],!(t=+t))return!1;switch(e){case"http":case"ws":return 80!==t;case"https":case"wss":return 443!==t;case"ftp":return 21!==t;case"gopher":return 70!==t;case"file":return!1}return 0!==t}}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var n=__webpack_module_cache__[t]={id:t,exports:{}};return __webpack_modules__[t].call(n.exports,n,n.exports,__webpack_require__),n.exports}__webpack_require__.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return __webpack_require__.d(e,{a:e}),e},__webpack_require__.d=(t,e)=>{for(var n in e)__webpack_require__.o(e,n)&&!__webpack_require__.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),__webpack_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),__webpack_require__.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var __webpack_exports__={};(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{CloudServicesCommentsAdapter:()=>wo,CloudServicesRevisionHistoryAdapter:()=>Ho,CloudServicesTrackChangesAdapter:()=>jo,PresenceList:()=>Ri,PresenceListUI:()=>Ei,RealTimeCollaborationClient:()=>ho,RealTimeCollaborativeComments:()=>No,RealTimeCollaborativeEditing:()=>Oo,RealTimeCollaborativeRevisionHistory:()=>Qo,RealTimeCollaborativeTrackChanges:()=>Uo,Sessions:()=>Zn,WebSocketGateway:()=>Fn});var t={};__webpack_require__.r(t),__webpack_require__.d(t,{Decoder:()=>xt,Encoder:()=>jt,PacketType:()=>Et,protocol:()=>Pt});var e=__webpack_require__(782),n=__webpack_require__(584),r=__webpack_require__(311),s=__webpack_require__(783);class o{static DESCRIPTOR_NAME;static DESCRIPTOR;constructor(...t){}}class i extends o{static TYPE="1000";static READABLE_TYPE_NAME;constructor(...t){super()}static fromJSON(t){throw new TypeError("Must be implemented in a child class!")}}class a extends i{id;static TYPE="21";static READABLE_TYPE_NAME="getUser";static DESCRIPTOR_NAME="GetUserMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1}}};constructor(t){super(),this.id=t}toJSON(){return{id:this.id}}static fromJSON(t){return new a(t.id)}}class c extends i{attributes;static DESCRIPTOR_NAME="GetUserResponse";static DESCRIPTOR={fields:{attributes:{rule:"repeated",type:"KeyValueDescriptor",id:1}}};constructor(t){super(),this.attributes=t}toJSON(){return{attributes:Object.keys(this.attributes).map(t=>({key:t,value:JSON.stringify(this.attributes[t])}))}}static fromJSON(t){const e=t.attributes.reduce((t,e)=>(t[e.key]=e.value?JSON.parse(e.value):null,t),{});return new c(e)}}var u=__webpack_require__(39);const d=(()=>{var t=u.Reader,e=u.Writer,n=u.util,r=u.roots.default||(u.roots.default={});return r.OperationMetadataDescriptor=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.userId="",s.prototype.type="",s.prototype.createdAt="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.userId&&Object.hasOwnProperty.call(t,"userId")&&n.uint32(10).string(t.userId),null!=t.type&&Object.hasOwnProperty.call(t,"type")&&n.uint32(18).string(t.type),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(26).string(t.createdAt),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.OperationMetadataDescriptor;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.userId=e.string();break;case 2:i.type=e.string();break;case 3:i.createdAt=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.userId&&t.hasOwnProperty("userId")&&!n.isString(t.userId)?"userId: string expected":null!=t.type&&t.hasOwnProperty("type")&&!n.isString(t.type)?"type: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null},s.fromObject=function(t){if(t instanceof r.OperationMetadataDescriptor)return t;var e=new r.OperationMetadataDescriptor;return null!=t.userId&&(e.userId=String(t.userId)),null!=t.type&&(e.type=String(t.type)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.userId="",n.type="",n.createdAt=""),null!=t.userId&&t.hasOwnProperty("userId")&&(n.userId=t.userId),null!=t.type&&t.hasOwnProperty("type")&&(n.type=t.type),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/OperationMetadataDescriptor"},s}(),r.CollaborativeEditingConnectMessage=function(){function s(t){if(this.buffers=[],this.types=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.bundleVersion="",s.prototype.buffers=n.emptyArray,s.prototype.types=n.emptyArray,s.prototype.lastOperationId="",s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.bundleVersion&&Object.hasOwnProperty.call(t,"bundleVersion")&&n.uint32(18).string(t.bundleVersion),null!=t.buffers&&t.buffers.length)for(var r=0;r<t.buffers.length;++r)n.uint32(26).bytes(t.buffers[r]);if(null!=t.types&&t.types.length){for(n.uint32(34).fork(),r=0;r<t.types.length;++r)n.uint32(t.types[r]);n.ldelim()}return null!=t.lastOperationId&&Object.hasOwnProperty.call(t,"lastOperationId")&&n.uint32(42).string(t.lastOperationId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CollaborativeEditingConnectMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.bundleVersion=e.string();break;case 3:i.buffers&&i.buffers.length||(i.buffers=[]),i.buffers.push(e.bytes());break;case 4:if(i.types&&i.types.length||(i.types=[]),2==(7&a))for(var c=e.uint32()+e.pos;e.pos<c;)i.types.push(e.uint32());else i.types.push(e.uint32());break;case 5:i.lastOperationId=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id))return"id: string expected";if(null!=t.bundleVersion&&t.hasOwnProperty("bundleVersion")&&!n.isString(t.bundleVersion))return"bundleVersion: string expected";if(null!=t.buffers&&t.hasOwnProperty("buffers")){if(!Array.isArray(t.buffers))return"buffers: array expected";for(var e=0;e<t.buffers.length;++e)if(!(t.buffers[e]&&"number"==typeof t.buffers[e].length||n.isString(t.buffers[e])))return"buffers: buffer[] expected"}if(null!=t.types&&t.hasOwnProperty("types")){if(!Array.isArray(t.types))return"types: array expected";for(e=0;e<t.types.length;++e)if(!n.isInteger(t.types[e]))return"types: integer[] expected"}return null!=t.lastOperationId&&t.hasOwnProperty("lastOperationId")&&!n.isString(t.lastOperationId)?"lastOperationId: string expected":null},s.fromObject=function(t){if(t instanceof r.CollaborativeEditingConnectMessage)return t;var e=new r.CollaborativeEditingConnectMessage;if(null!=t.id&&(e.id=String(t.id)),null!=t.bundleVersion&&(e.bundleVersion=String(t.bundleVersion)),t.buffers){if(!Array.isArray(t.buffers))throw TypeError(".CollaborativeEditingConnectMessage.buffers: array expected");e.buffers=[];for(var s=0;s<t.buffers.length;++s)"string"==typeof t.buffers[s]?n.base64.decode(t.buffers[s],e.buffers[s]=n.newBuffer(n.base64.length(t.buffers[s])),0):t.buffers[s].length>=0&&(e.buffers[s]=t.buffers[s])}if(t.types){if(!Array.isArray(t.types))throw TypeError(".CollaborativeEditingConnectMessage.types: array expected");for(e.types=[],s=0;s<t.types.length;++s)e.types[s]=t.types[s]>>>0}return null!=t.lastOperationId&&(e.lastOperationId=String(t.lastOperationId)),e},s.toObject=function(t,e){e||(e={});var r={};if((e.arrays||e.defaults)&&(r.buffers=[],r.types=[]),e.defaults&&(r.id="",r.bundleVersion="",r.lastOperationId=""),null!=t.id&&t.hasOwnProperty("id")&&(r.id=t.id),null!=t.bundleVersion&&t.hasOwnProperty("bundleVersion")&&(r.bundleVersion=t.bundleVersion),t.buffers&&t.buffers.length){r.buffers=[];for(var s=0;s<t.buffers.length;++s)r.buffers[s]=e.bytes===String?n.base64.encode(t.buffers[s],0,t.buffers[s].length):e.bytes===Array?Array.prototype.slice.call(t.buffers[s]):t.buffers[s]}if(t.types&&t.types.length)for(r.types=[],s=0;s<t.types.length;++s)r.types[s]=t.types[s];return null!=t.lastOperationId&&t.hasOwnProperty("lastOperationId")&&(r.lastOperationId=t.lastOperationId),r},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CollaborativeEditingConnectMessage"},s}(),r.CollaborativeEditingReconnectMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.bundleVersion="",s.prototype.lastKnowVersion=0,s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.bundleVersion&&Object.hasOwnProperty.call(t,"bundleVersion")&&n.uint32(18).string(t.bundleVersion),null!=t.lastKnowVersion&&Object.hasOwnProperty.call(t,"lastKnowVersion")&&n.uint32(24).uint32(t.lastKnowVersion),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CollaborativeEditingReconnectMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.bundleVersion=e.string();break;case 3:i.lastKnowVersion=e.uint32();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id)?"id: string expected":null!=t.bundleVersion&&t.hasOwnProperty("bundleVersion")&&!n.isString(t.bundleVersion)?"bundleVersion: string expected":null!=t.lastKnowVersion&&t.hasOwnProperty("lastKnowVersion")&&!n.isInteger(t.lastKnowVersion)?"lastKnowVersion: integer expected":null},s.fromObject=function(t){if(t instanceof r.CollaborativeEditingReconnectMessage)return t;var e=new r.CollaborativeEditingReconnectMessage;return null!=t.id&&(e.id=String(t.id)),null!=t.bundleVersion&&(e.bundleVersion=String(t.bundleVersion)),null!=t.lastKnowVersion&&(e.lastKnowVersion=t.lastKnowVersion>>>0),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.id="",n.bundleVersion="",n.lastKnowVersion=0),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),null!=t.bundleVersion&&t.hasOwnProperty("bundleVersion")&&(n.bundleVersion=t.bundleVersion),null!=t.lastKnowVersion&&t.hasOwnProperty("lastKnowVersion")&&(n.lastKnowVersion=t.lastKnowVersion),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CollaborativeEditingReconnectMessage"},s}(),r.CollaborativeEditingUpdateMessage=function(){function s(t){if(this.buffers=[],this.types=[],this.metadata=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.baseVersion=0,s.prototype.buffers=n.emptyArray,s.prototype.types=n.emptyArray,s.prototype.metadata=n.emptyArray,s.prototype.lastOperationId="",s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.baseVersion&&Object.hasOwnProperty.call(t,"baseVersion")&&n.uint32(16).uint32(t.baseVersion),null!=t.buffers&&t.buffers.length)for(var s=0;s<t.buffers.length;++s)n.uint32(26).bytes(t.buffers[s]);if(null!=t.types&&t.types.length){for(n.uint32(34).fork(),s=0;s<t.types.length;++s)n.uint32(t.types[s]);n.ldelim()}if(null!=t.metadata&&t.metadata.length)for(s=0;s<t.metadata.length;++s)r.OperationMetadataDescriptor.encode(t.metadata[s],n.uint32(50).fork()).ldelim();return null!=t.lastOperationId&&Object.hasOwnProperty.call(t,"lastOperationId")&&n.uint32(58).string(t.lastOperationId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CollaborativeEditingUpdateMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.baseVersion=e.uint32();break;case 3:i.buffers&&i.buffers.length||(i.buffers=[]),i.buffers.push(e.bytes());break;case 4:if(i.types&&i.types.length||(i.types=[]),2==(7&a))for(var c=e.uint32()+e.pos;e.pos<c;)i.types.push(e.uint32());else i.types.push(e.uint32());break;case 6:i.metadata&&i.metadata.length||(i.metadata=[]),i.metadata.push(r.OperationMetadataDescriptor.decode(e,e.uint32()));break;case 7:i.lastOperationId=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id))return"id: string expected";if(null!=t.baseVersion&&t.hasOwnProperty("baseVersion")&&!n.isInteger(t.baseVersion))return"baseVersion: integer expected";if(null!=t.buffers&&t.hasOwnProperty("buffers")){if(!Array.isArray(t.buffers))return"buffers: array expected";for(var e=0;e<t.buffers.length;++e)if(!(t.buffers[e]&&"number"==typeof t.buffers[e].length||n.isString(t.buffers[e])))return"buffers: buffer[] expected"}if(null!=t.types&&t.hasOwnProperty("types")){if(!Array.isArray(t.types))return"types: array expected";for(e=0;e<t.types.length;++e)if(!n.isInteger(t.types[e]))return"types: integer[] expected"}if(null!=t.metadata&&t.hasOwnProperty("metadata")){if(!Array.isArray(t.metadata))return"metadata: array expected";for(e=0;e<t.metadata.length;++e){var s=r.OperationMetadataDescriptor.verify(t.metadata[e]);if(s)return"metadata."+s}}return null!=t.lastOperationId&&t.hasOwnProperty("lastOperationId")&&!n.isString(t.lastOperationId)?"lastOperationId: string expected":null},s.fromObject=function(t){if(t instanceof r.CollaborativeEditingUpdateMessage)return t;var e=new r.CollaborativeEditingUpdateMessage;if(null!=t.id&&(e.id=String(t.id)),null!=t.baseVersion&&(e.baseVersion=t.baseVersion>>>0),t.buffers){if(!Array.isArray(t.buffers))throw TypeError(".CollaborativeEditingUpdateMessage.buffers: array expected");e.buffers=[];for(var s=0;s<t.buffers.length;++s)"string"==typeof t.buffers[s]?n.base64.decode(t.buffers[s],e.buffers[s]=n.newBuffer(n.base64.length(t.buffers[s])),0):t.buffers[s].length>=0&&(e.buffers[s]=t.buffers[s])}if(t.types){if(!Array.isArray(t.types))throw TypeError(".CollaborativeEditingUpdateMessage.types: array expected");for(e.types=[],s=0;s<t.types.length;++s)e.types[s]=t.types[s]>>>0}if(t.metadata){if(!Array.isArray(t.metadata))throw TypeError(".CollaborativeEditingUpdateMessage.metadata: array expected");for(e.metadata=[],s=0;s<t.metadata.length;++s){if("object"!=typeof t.metadata[s])throw TypeError(".CollaborativeEditingUpdateMessage.metadata: object expected");e.metadata[s]=r.OperationMetadataDescriptor.fromObject(t.metadata[s])}}return null!=t.lastOperationId&&(e.lastOperationId=String(t.lastOperationId)),e},s.toObject=function(t,e){e||(e={});var s={};if((e.arrays||e.defaults)&&(s.buffers=[],s.types=[],s.metadata=[]),e.defaults&&(s.id="",s.baseVersion=0,s.lastOperationId=""),null!=t.id&&t.hasOwnProperty("id")&&(s.id=t.id),null!=t.baseVersion&&t.hasOwnProperty("baseVersion")&&(s.baseVersion=t.baseVersion),t.buffers&&t.buffers.length){s.buffers=[];for(var o=0;o<t.buffers.length;++o)s.buffers[o]=e.bytes===String?n.base64.encode(t.buffers[o],0,t.buffers[o].length):e.bytes===Array?Array.prototype.slice.call(t.buffers[o]):t.buffers[o]}if(t.types&&t.types.length)for(s.types=[],o=0;o<t.types.length;++o)s.types[o]=t.types[o];if(t.metadata&&t.metadata.length)for(s.metadata=[],o=0;o<t.metadata.length;++o)s.metadata[o]=r.OperationMetadataDescriptor.toObject(t.metadata[o],e);return null!=t.lastOperationId&&t.hasOwnProperty("lastOperationId")&&(s.lastOperationId=t.lastOperationId),s},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CollaborativeEditingUpdateMessage"},s}(),r.GetDocumentDetailsMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.documentId="",s.prototype.environmentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(10).string(t.documentId),null!=t.environmentId&&Object.hasOwnProperty.call(t,"environmentId")&&n.uint32(18).string(t.environmentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.GetDocumentDetailsMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.documentId=e.string();break;case 2:i.environmentId=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null!=t.environmentId&&t.hasOwnProperty("environmentId")&&!n.isString(t.environmentId)?"environmentId: string expected":null},s.fromObject=function(t){if(t instanceof r.GetDocumentDetailsMessage)return t;var e=new r.GetDocumentDetailsMessage;return null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.environmentId&&(e.environmentId=String(t.environmentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.documentId="",n.environmentId=""),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.environmentId&&t.hasOwnProperty("environmentId")&&(n.environmentId=t.environmentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/GetDocumentDetailsMessage"},s}(),r.CollaborativeEditingConnectResponse=function(){function s(t){if(this.buffers=[],this.types=[],this.metadata=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.channel="",s.prototype.offset=0,s.prototype.version=0,s.prototype.buffers=n.emptyArray,s.prototype.types=n.emptyArray,s.prototype.metadata=n.emptyArray,s.prototype.initData="",s.prototype.isInitialized=!1,s.prototype.sessionId="",s.prototype.lastOperationId="",s.prototype.sessionCreatedAt="",s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.channel&&Object.hasOwnProperty.call(t,"channel")&&n.uint32(10).string(t.channel),null!=t.offset&&Object.hasOwnProperty.call(t,"offset")&&n.uint32(16).uint32(t.offset),null!=t.version&&Object.hasOwnProperty.call(t,"version")&&n.uint32(24).uint32(t.version),null!=t.buffers&&t.buffers.length)for(var s=0;s<t.buffers.length;++s)n.uint32(34).bytes(t.buffers[s]);if(null!=t.types&&t.types.length){for(n.uint32(42).fork(),s=0;s<t.types.length;++s)n.uint32(t.types[s]);n.ldelim()}if(null!=t.metadata&&t.metadata.length)for(s=0;s<t.metadata.length;++s)r.OperationMetadataDescriptor.encode(t.metadata[s],n.uint32(58).fork()).ldelim();return null!=t.initData&&Object.hasOwnProperty.call(t,"initData")&&n.uint32(66).string(t.initData),null!=t.isInitialized&&Object.hasOwnProperty.call(t,"isInitialized")&&n.uint32(72).bool(t.isInitialized),null!=t.sessionId&&Object.hasOwnProperty.call(t,"sessionId")&&n.uint32(82).string(t.sessionId),null!=t.lastOperationId&&Object.hasOwnProperty.call(t,"lastOperationId")&&n.uint32(90).string(t.lastOperationId),null!=t.sessionCreatedAt&&Object.hasOwnProperty.call(t,"sessionCreatedAt")&&n.uint32(98).string(t.sessionCreatedAt),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CollaborativeEditingConnectResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.channel=e.string();break;case 2:i.offset=e.uint32();break;case 3:i.version=e.uint32();break;case 4:i.buffers&&i.buffers.length||(i.buffers=[]),i.buffers.push(e.bytes());break;case 5:if(i.types&&i.types.length||(i.types=[]),2==(7&a))for(var c=e.uint32()+e.pos;e.pos<c;)i.types.push(e.uint32());else i.types.push(e.uint32());break;case 7:i.metadata&&i.metadata.length||(i.metadata=[]),i.metadata.push(r.OperationMetadataDescriptor.decode(e,e.uint32()));break;case 8:i.initData=e.string();break;case 9:i.isInitialized=e.bool();break;case 10:i.sessionId=e.string();break;case 11:i.lastOperationId=e.string();break;case 12:i.sessionCreatedAt=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.channel&&t.hasOwnProperty("channel")&&!n.isString(t.channel))return"channel: string expected";if(null!=t.offset&&t.hasOwnProperty("offset")&&!n.isInteger(t.offset))return"offset: integer expected";if(null!=t.version&&t.hasOwnProperty("version")&&!n.isInteger(t.version))return"version: integer expected";if(null!=t.buffers&&t.hasOwnProperty("buffers")){if(!Array.isArray(t.buffers))return"buffers: array expected";for(var e=0;e<t.buffers.length;++e)if(!(t.buffers[e]&&"number"==typeof t.buffers[e].length||n.isString(t.buffers[e])))return"buffers: buffer[] expected"}if(null!=t.types&&t.hasOwnProperty("types")){if(!Array.isArray(t.types))return"types: array expected";for(e=0;e<t.types.length;++e)if(!n.isInteger(t.types[e]))return"types: integer[] expected"}if(null!=t.metadata&&t.hasOwnProperty("metadata")){if(!Array.isArray(t.metadata))return"metadata: array expected";for(e=0;e<t.metadata.length;++e){var s=r.OperationMetadataDescriptor.verify(t.metadata[e]);if(s)return"metadata."+s}}return null!=t.initData&&t.hasOwnProperty("initData")&&!n.isString(t.initData)?"initData: string expected":null!=t.isInitialized&&t.hasOwnProperty("isInitialized")&&"boolean"!=typeof t.isInitialized?"isInitialized: boolean expected":null!=t.sessionId&&t.hasOwnProperty("sessionId")&&!n.isString(t.sessionId)?"sessionId: string expected":null!=t.lastOperationId&&t.hasOwnProperty("lastOperationId")&&!n.isString(t.lastOperationId)?"lastOperationId: string expected":null!=t.sessionCreatedAt&&t.hasOwnProperty("sessionCreatedAt")&&!n.isString(t.sessionCreatedAt)?"sessionCreatedAt: string expected":null},s.fromObject=function(t){if(t instanceof r.CollaborativeEditingConnectResponse)return t;var e=new r.CollaborativeEditingConnectResponse;if(null!=t.channel&&(e.channel=String(t.channel)),null!=t.offset&&(e.offset=t.offset>>>0),null!=t.version&&(e.version=t.version>>>0),t.buffers){if(!Array.isArray(t.buffers))throw TypeError(".CollaborativeEditingConnectResponse.buffers: array expected");e.buffers=[];for(var s=0;s<t.buffers.length;++s)"string"==typeof t.buffers[s]?n.base64.decode(t.buffers[s],e.buffers[s]=n.newBuffer(n.base64.length(t.buffers[s])),0):t.buffers[s].length>=0&&(e.buffers[s]=t.buffers[s])}if(t.types){if(!Array.isArray(t.types))throw TypeError(".CollaborativeEditingConnectResponse.types: array expected");for(e.types=[],s=0;s<t.types.length;++s)e.types[s]=t.types[s]>>>0}if(t.metadata){if(!Array.isArray(t.metadata))throw TypeError(".CollaborativeEditingConnectResponse.metadata: array expected");for(e.metadata=[],s=0;s<t.metadata.length;++s){if("object"!=typeof t.metadata[s])throw TypeError(".CollaborativeEditingConnectResponse.metadata: object expected");e.metadata[s]=r.OperationMetadataDescriptor.fromObject(t.metadata[s])}}return null!=t.initData&&(e.initData=String(t.initData)),null!=t.isInitialized&&(e.isInitialized=Boolean(t.isInitialized)),null!=t.sessionId&&(e.sessionId=String(t.sessionId)),null!=t.lastOperationId&&(e.lastOperationId=String(t.lastOperationId)),null!=t.sessionCreatedAt&&(e.sessionCreatedAt=String(t.sessionCreatedAt)),e},s.toObject=function(t,e){e||(e={});var s={};if((e.arrays||e.defaults)&&(s.buffers=[],s.types=[],s.metadata=[]),e.defaults&&(s.channel="",s.offset=0,s.version=0,s.initData="",s.isInitialized=!1,s.sessionId="",s.lastOperationId="",s.sessionCreatedAt=""),null!=t.channel&&t.hasOwnProperty("channel")&&(s.channel=t.channel),null!=t.offset&&t.hasOwnProperty("offset")&&(s.offset=t.offset),null!=t.version&&t.hasOwnProperty("version")&&(s.version=t.version),t.buffers&&t.buffers.length){s.buffers=[];for(var o=0;o<t.buffers.length;++o)s.buffers[o]=e.bytes===String?n.base64.encode(t.buffers[o],0,t.buffers[o].length):e.bytes===Array?Array.prototype.slice.call(t.buffers[o]):t.buffers[o]}if(t.types&&t.types.length)for(s.types=[],o=0;o<t.types.length;++o)s.types[o]=t.types[o];if(t.metadata&&t.metadata.length)for(s.metadata=[],o=0;o<t.metadata.length;++o)s.metadata[o]=r.OperationMetadataDescriptor.toObject(t.metadata[o],e);return null!=t.initData&&t.hasOwnProperty("initData")&&(s.initData=t.initData),null!=t.isInitialized&&t.hasOwnProperty("isInitialized")&&(s.isInitialized=t.isInitialized),null!=t.sessionId&&t.hasOwnProperty("sessionId")&&(s.sessionId=t.sessionId),null!=t.lastOperationId&&t.hasOwnProperty("lastOperationId")&&(s.lastOperationId=t.lastOperationId),null!=t.sessionCreatedAt&&t.hasOwnProperty("sessionCreatedAt")&&(s.sessionCreatedAt=t.sessionCreatedAt),s},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CollaborativeEditingConnectResponse"},s}(),r.CollaborativeEditingResponse=function(){function s(t){if(this.buffers=[],this.types=[],this.metadata=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.version=0,s.prototype.buffers=n.emptyArray,s.prototype.types=n.emptyArray,s.prototype.metadata=n.emptyArray,s.prototype.lastOperationId="",s.prototype.lastOperationAcceptedAt="",s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.version&&Object.hasOwnProperty.call(t,"version")&&n.uint32(8).uint32(t.version),null!=t.buffers&&t.buffers.length)for(var s=0;s<t.buffers.length;++s)n.uint32(18).bytes(t.buffers[s]);if(null!=t.types&&t.types.length){for(n.uint32(26).fork(),s=0;s<t.types.length;++s)n.uint32(t.types[s]);n.ldelim()}if(null!=t.metadata&&t.metadata.length)for(s=0;s<t.metadata.length;++s)r.OperationMetadataDescriptor.encode(t.metadata[s],n.uint32(42).fork()).ldelim();return null!=t.lastOperationId&&Object.hasOwnProperty.call(t,"lastOperationId")&&n.uint32(50).string(t.lastOperationId),null!=t.lastOperationAcceptedAt&&Object.hasOwnProperty.call(t,"lastOperationAcceptedAt")&&n.uint32(58).string(t.lastOperationAcceptedAt),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CollaborativeEditingResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.version=e.uint32();break;case 2:i.buffers&&i.buffers.length||(i.buffers=[]),i.buffers.push(e.bytes());break;case 3:if(i.types&&i.types.length||(i.types=[]),2==(7&a))for(var c=e.uint32()+e.pos;e.pos<c;)i.types.push(e.uint32());else i.types.push(e.uint32());break;case 5:i.metadata&&i.metadata.length||(i.metadata=[]),i.metadata.push(r.OperationMetadataDescriptor.decode(e,e.uint32()));break;case 6:i.lastOperationId=e.string();break;case 7:i.lastOperationAcceptedAt=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.version&&t.hasOwnProperty("version")&&!n.isInteger(t.version))return"version: integer expected";if(null!=t.buffers&&t.hasOwnProperty("buffers")){if(!Array.isArray(t.buffers))return"buffers: array expected";for(var e=0;e<t.buffers.length;++e)if(!(t.buffers[e]&&"number"==typeof t.buffers[e].length||n.isString(t.buffers[e])))return"buffers: buffer[] expected"}if(null!=t.types&&t.hasOwnProperty("types")){if(!Array.isArray(t.types))return"types: array expected";for(e=0;e<t.types.length;++e)if(!n.isInteger(t.types[e]))return"types: integer[] expected"}if(null!=t.metadata&&t.hasOwnProperty("metadata")){if(!Array.isArray(t.metadata))return"metadata: array expected";for(e=0;e<t.metadata.length;++e){var s=r.OperationMetadataDescriptor.verify(t.metadata[e]);if(s)return"metadata."+s}}return null!=t.lastOperationId&&t.hasOwnProperty("lastOperationId")&&!n.isString(t.lastOperationId)?"lastOperationId: string expected":null!=t.lastOperationAcceptedAt&&t.hasOwnProperty("lastOperationAcceptedAt")&&!n.isString(t.lastOperationAcceptedAt)?"lastOperationAcceptedAt: string expected":null},s.fromObject=function(t){if(t instanceof r.CollaborativeEditingResponse)return t;var e=new r.CollaborativeEditingResponse;if(null!=t.version&&(e.version=t.version>>>0),t.buffers){if(!Array.isArray(t.buffers))throw TypeError(".CollaborativeEditingResponse.buffers: array expected");e.buffers=[];for(var s=0;s<t.buffers.length;++s)"string"==typeof t.buffers[s]?n.base64.decode(t.buffers[s],e.buffers[s]=n.newBuffer(n.base64.length(t.buffers[s])),0):t.buffers[s].length>=0&&(e.buffers[s]=t.buffers[s])}if(t.types){if(!Array.isArray(t.types))throw TypeError(".CollaborativeEditingResponse.types: array expected");for(e.types=[],s=0;s<t.types.length;++s)e.types[s]=t.types[s]>>>0}if(t.metadata){if(!Array.isArray(t.metadata))throw TypeError(".CollaborativeEditingResponse.metadata: array expected");for(e.metadata=[],s=0;s<t.metadata.length;++s){if("object"!=typeof t.metadata[s])throw TypeError(".CollaborativeEditingResponse.metadata: object expected");e.metadata[s]=r.OperationMetadataDescriptor.fromObject(t.metadata[s])}}return null!=t.lastOperationId&&(e.lastOperationId=String(t.lastOperationId)),null!=t.lastOperationAcceptedAt&&(e.lastOperationAcceptedAt=String(t.lastOperationAcceptedAt)),e},s.toObject=function(t,e){e||(e={});var s={};if((e.arrays||e.defaults)&&(s.buffers=[],s.types=[],s.metadata=[]),e.defaults&&(s.version=0,s.lastOperationId="",s.lastOperationAcceptedAt=""),null!=t.version&&t.hasOwnProperty("version")&&(s.version=t.version),t.buffers&&t.buffers.length){s.buffers=[];for(var o=0;o<t.buffers.length;++o)s.buffers[o]=e.bytes===String?n.base64.encode(t.buffers[o],0,t.buffers[o].length):e.bytes===Array?Array.prototype.slice.call(t.buffers[o]):t.buffers[o]}if(t.types&&t.types.length)for(s.types=[],o=0;o<t.types.length;++o)s.types[o]=t.types[o];if(t.metadata&&t.metadata.length)for(s.metadata=[],o=0;o<t.metadata.length;++o)s.metadata[o]=r.OperationMetadataDescriptor.toObject(t.metadata[o],e);return null!=t.lastOperationId&&t.hasOwnProperty("lastOperationId")&&(s.lastOperationId=t.lastOperationId),null!=t.lastOperationAcceptedAt&&t.hasOwnProperty("lastOperationAcceptedAt")&&(s.lastOperationAcceptedAt=t.lastOperationAcceptedAt),s},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CollaborativeEditingResponse"},s}(),r.GetDocumentDetailsResponse=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.lastDocumentSessionId="",s.prototype.lastDocumentSessionOperationId="",s.prototype.currentDocumentSessionId="",s.prototype.currentDocumentSessionVersion=0,s.prototype.currentDocumentSessionOperationId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.lastDocumentSessionId&&Object.hasOwnProperty.call(t,"lastDocumentSessionId")&&n.uint32(10).string(t.lastDocumentSessionId),null!=t.lastDocumentSessionOperationId&&Object.hasOwnProperty.call(t,"lastDocumentSessionOperationId")&&n.uint32(18).string(t.lastDocumentSessionOperationId),null!=t.currentDocumentSessionId&&Object.hasOwnProperty.call(t,"currentDocumentSessionId")&&n.uint32(26).string(t.currentDocumentSessionId),null!=t.currentDocumentSessionVersion&&Object.hasOwnProperty.call(t,"currentDocumentSessionVersion")&&n.uint32(32).uint32(t.currentDocumentSessionVersion),null!=t.currentDocumentSessionOperationId&&Object.hasOwnProperty.call(t,"currentDocumentSessionOperationId")&&n.uint32(42).string(t.currentDocumentSessionOperationId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.GetDocumentDetailsResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.lastDocumentSessionId=e.string();break;case 2:i.lastDocumentSessionOperationId=e.string();break;case 3:i.currentDocumentSessionId=e.string();break;case 4:i.currentDocumentSessionVersion=e.uint32();break;case 5:i.currentDocumentSessionOperationId=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.lastDocumentSessionId&&t.hasOwnProperty("lastDocumentSessionId")&&!n.isString(t.lastDocumentSessionId)?"lastDocumentSessionId: string expected":null!=t.lastDocumentSessionOperationId&&t.hasOwnProperty("lastDocumentSessionOperationId")&&!n.isString(t.lastDocumentSessionOperationId)?"lastDocumentSessionOperationId: string expected":null!=t.currentDocumentSessionId&&t.hasOwnProperty("currentDocumentSessionId")&&!n.isString(t.currentDocumentSessionId)?"currentDocumentSessionId: string expected":null!=t.currentDocumentSessionVersion&&t.hasOwnProperty("currentDocumentSessionVersion")&&!n.isInteger(t.currentDocumentSessionVersion)?"currentDocumentSessionVersion: integer expected":null!=t.currentDocumentSessionOperationId&&t.hasOwnProperty("currentDocumentSessionOperationId")&&!n.isString(t.currentDocumentSessionOperationId)?"currentDocumentSessionOperationId: string expected":null},s.fromObject=function(t){if(t instanceof r.GetDocumentDetailsResponse)return t;var e=new r.GetDocumentDetailsResponse;return null!=t.lastDocumentSessionId&&(e.lastDocumentSessionId=String(t.lastDocumentSessionId)),null!=t.lastDocumentSessionOperationId&&(e.lastDocumentSessionOperationId=String(t.lastDocumentSessionOperationId)),null!=t.currentDocumentSessionId&&(e.currentDocumentSessionId=String(t.currentDocumentSessionId)),null!=t.currentDocumentSessionVersion&&(e.currentDocumentSessionVersion=t.currentDocumentSessionVersion>>>0),null!=t.currentDocumentSessionOperationId&&(e.currentDocumentSessionOperationId=String(t.currentDocumentSessionOperationId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.lastDocumentSessionId="",n.lastDocumentSessionOperationId="",n.currentDocumentSessionId="",n.currentDocumentSessionVersion=0,n.currentDocumentSessionOperationId=""),null!=t.lastDocumentSessionId&&t.hasOwnProperty("lastDocumentSessionId")&&(n.lastDocumentSessionId=t.lastDocumentSessionId),null!=t.lastDocumentSessionOperationId&&t.hasOwnProperty("lastDocumentSessionOperationId")&&(n.lastDocumentSessionOperationId=t.lastDocumentSessionOperationId),null!=t.currentDocumentSessionId&&t.hasOwnProperty("currentDocumentSessionId")&&(n.currentDocumentSessionId=t.currentDocumentSessionId),null!=t.currentDocumentSessionVersion&&t.hasOwnProperty("currentDocumentSessionVersion")&&(n.currentDocumentSessionVersion=t.currentDocumentSessionVersion),null!=t.currentDocumentSessionOperationId&&t.hasOwnProperty("currentDocumentSessionOperationId")&&(n.currentDocumentSessionOperationId=t.currentDocumentSessionOperationId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/GetDocumentDetailsResponse"},s}(),r.CommentDescriptor=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentId="",s.prototype.commentThreadId="",s.prototype.userId="",s.prototype.content="",s.prototype.documentId="",s.prototype.createdAt="",s.prototype.attributes="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentId&&Object.hasOwnProperty.call(t,"commentId")&&n.uint32(10).string(t.commentId),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(18).string(t.commentThreadId),null!=t.userId&&Object.hasOwnProperty.call(t,"userId")&&n.uint32(26).string(t.userId),null!=t.content&&Object.hasOwnProperty.call(t,"content")&&n.uint32(34).string(t.content),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(42).string(t.documentId),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(50).string(t.createdAt),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(58).string(t.attributes),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentDescriptor;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentId=e.string();break;case 2:i.commentThreadId=e.string();break;case 3:i.userId=e.string();break;case 4:i.content=e.string();break;case 5:i.documentId=e.string();break;case 6:i.createdAt=e.string();break;case 7:i.attributes=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.commentId&&t.hasOwnProperty("commentId")&&!n.isString(t.commentId)?"commentId: string expected":null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId)?"commentThreadId: string expected":null!=t.userId&&t.hasOwnProperty("userId")&&!n.isString(t.userId)?"userId: string expected":null!=t.content&&t.hasOwnProperty("content")&&!n.isString(t.content)?"content: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentDescriptor)return t;var e=new r.CommentDescriptor;return null!=t.commentId&&(e.commentId=String(t.commentId)),null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.userId&&(e.userId=String(t.userId)),null!=t.content&&(e.content=String(t.content)),null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),null!=t.attributes&&(e.attributes=String(t.attributes)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentId="",n.commentThreadId="",n.userId="",n.content="",n.documentId="",n.createdAt="",n.attributes=""),null!=t.commentId&&t.hasOwnProperty("commentId")&&(n.commentId=t.commentId),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.userId&&t.hasOwnProperty("userId")&&(n.userId=t.userId),null!=t.content&&t.hasOwnProperty("content")&&(n.content=t.content),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentDescriptor"},s}(),r.CommentsThreadDescriptor=function(){function s(t){if(this.comments=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.comments=n.emptyArray,s.prototype.resolvedAt="",s.prototype.resolvedBy="",s.prototype.context="",s.prototype.createdAt="",s.prototype.deletedAt="",s.prototype.attributes="",s.prototype.unlinkedAt="",s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.comments&&t.comments.length)for(var s=0;s<t.comments.length;++s)r.CommentDescriptor.encode(t.comments[s],n.uint32(18).fork()).ldelim();return null!=t.resolvedAt&&Object.hasOwnProperty.call(t,"resolvedAt")&&n.uint32(26).string(t.resolvedAt),null!=t.resolvedBy&&Object.hasOwnProperty.call(t,"resolvedBy")&&n.uint32(34).string(t.resolvedBy),null!=t.context&&Object.hasOwnProperty.call(t,"context")&&n.uint32(42).string(t.context),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(50).string(t.createdAt),null!=t.deletedAt&&Object.hasOwnProperty.call(t,"deletedAt")&&n.uint32(58).string(t.deletedAt),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(66).string(t.attributes),null!=t.unlinkedAt&&Object.hasOwnProperty.call(t,"unlinkedAt")&&n.uint32(74).string(t.unlinkedAt),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsThreadDescriptor;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.comments&&i.comments.length||(i.comments=[]),i.comments.push(r.CommentDescriptor.decode(e,e.uint32()));break;case 3:i.resolvedAt=e.string();break;case 4:i.resolvedBy=e.string();break;case 5:i.context=e.string();break;case 6:i.createdAt=e.string();break;case 7:i.deletedAt=e.string();break;case 8:i.attributes=e.string();break;case 9:i.unlinkedAt=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId))return"commentThreadId: string expected";if(null!=t.comments&&t.hasOwnProperty("comments")){if(!Array.isArray(t.comments))return"comments: array expected";for(var e=0;e<t.comments.length;++e){var s=r.CommentDescriptor.verify(t.comments[e]);if(s)return"comments."+s}}return null!=t.resolvedAt&&t.hasOwnProperty("resolvedAt")&&!n.isString(t.resolvedAt)?"resolvedAt: string expected":null!=t.resolvedBy&&t.hasOwnProperty("resolvedBy")&&!n.isString(t.resolvedBy)?"resolvedBy: string expected":null!=t.context&&t.hasOwnProperty("context")&&!n.isString(t.context)?"context: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null!=t.deletedAt&&t.hasOwnProperty("deletedAt")&&!n.isString(t.deletedAt)?"deletedAt: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null!=t.unlinkedAt&&t.hasOwnProperty("unlinkedAt")&&!n.isString(t.unlinkedAt)?"unlinkedAt: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsThreadDescriptor)return t;var e=new r.CommentsThreadDescriptor;if(null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),t.comments){if(!Array.isArray(t.comments))throw TypeError(".CommentsThreadDescriptor.comments: array expected");e.comments=[];for(var n=0;n<t.comments.length;++n){if("object"!=typeof t.comments[n])throw TypeError(".CommentsThreadDescriptor.comments: object expected");e.comments[n]=r.CommentDescriptor.fromObject(t.comments[n])}}return null!=t.resolvedAt&&(e.resolvedAt=String(t.resolvedAt)),null!=t.resolvedBy&&(e.resolvedBy=String(t.resolvedBy)),null!=t.context&&(e.context=String(t.context)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),null!=t.deletedAt&&(e.deletedAt=String(t.deletedAt)),null!=t.attributes&&(e.attributes=String(t.attributes)),null!=t.unlinkedAt&&(e.unlinkedAt=String(t.unlinkedAt)),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.comments=[]),e.defaults&&(n.commentThreadId="",n.resolvedAt="",n.resolvedBy="",n.context="",n.createdAt="",n.deletedAt="",n.attributes="",n.unlinkedAt=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),t.comments&&t.comments.length){n.comments=[];for(var s=0;s<t.comments.length;++s)n.comments[s]=r.CommentDescriptor.toObject(t.comments[s],e)}return null!=t.resolvedAt&&t.hasOwnProperty("resolvedAt")&&(n.resolvedAt=t.resolvedAt),null!=t.resolvedBy&&t.hasOwnProperty("resolvedBy")&&(n.resolvedBy=t.resolvedBy),null!=t.context&&t.hasOwnProperty("context")&&(n.context=t.context),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),null!=t.deletedAt&&t.hasOwnProperty("deletedAt")&&(n.deletedAt=t.deletedAt),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),null!=t.unlinkedAt&&t.hasOwnProperty("unlinkedAt")&&(n.unlinkedAt=t.unlinkedAt),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsThreadDescriptor"},s}(),r.CommentThreadAddedCommentDescriptor=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentId="",s.prototype.createdAt="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentId&&Object.hasOwnProperty.call(t,"commentId")&&n.uint32(10).string(t.commentId),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(18).string(t.createdAt),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentThreadAddedCommentDescriptor;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentId=e.string();break;case 2:i.createdAt=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.commentId&&t.hasOwnProperty("commentId")&&!n.isString(t.commentId)?"commentId: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentThreadAddedCommentDescriptor)return t;var e=new r.CommentThreadAddedCommentDescriptor;return null!=t.commentId&&(e.commentId=String(t.commentId)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentId="",n.createdAt=""),null!=t.commentId&&t.hasOwnProperty("commentId")&&(n.commentId=t.commentId),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentThreadAddedCommentDescriptor"},s}(),r.CommentsV2AddCommentMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.content="",s.prototype.documentId="",s.prototype.commentId="",s.prototype.createdAt="",s.prototype.userId="",s.prototype.attributes="",s.prototype.commentThread=null,s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.content&&Object.hasOwnProperty.call(t,"content")&&n.uint32(18).string(t.content),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(26).string(t.documentId),null!=t.commentId&&Object.hasOwnProperty.call(t,"commentId")&&n.uint32(34).string(t.commentId),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(42).string(t.createdAt),null!=t.userId&&Object.hasOwnProperty.call(t,"userId")&&n.uint32(50).string(t.userId),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(58).string(t.attributes),null!=t.commentThread&&Object.hasOwnProperty.call(t,"commentThread")&&r.CommentsThreadDescriptor.encode(t.commentThread,n.uint32(66).fork()).ldelim(),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2AddCommentMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.content=e.string();break;case 3:i.documentId=e.string();break;case 4:i.commentId=e.string();break;case 5:i.createdAt=e.string();break;case 6:i.userId=e.string();break;case 7:i.attributes=e.string();break;case 8:i.commentThread=r.CommentsThreadDescriptor.decode(e,e.uint32());break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId))return"commentThreadId: string expected";if(null!=t.content&&t.hasOwnProperty("content")&&!n.isString(t.content))return"content: string expected";if(null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId))return"documentId: string expected";if(null!=t.commentId&&t.hasOwnProperty("commentId")&&!n.isString(t.commentId))return"commentId: string expected";if(null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt))return"createdAt: string expected";if(null!=t.userId&&t.hasOwnProperty("userId")&&!n.isString(t.userId))return"userId: string expected";if(null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes))return"attributes: string expected";if(null!=t.commentThread&&t.hasOwnProperty("commentThread")){var e=r.CommentsThreadDescriptor.verify(t.commentThread);if(e)return"commentThread."+e}return null},s.fromObject=function(t){if(t instanceof r.CommentsV2AddCommentMessage)return t;var e=new r.CommentsV2AddCommentMessage;if(null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.content&&(e.content=String(t.content)),null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.commentId&&(e.commentId=String(t.commentId)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),null!=t.userId&&(e.userId=String(t.userId)),null!=t.attributes&&(e.attributes=String(t.attributes)),null!=t.commentThread){if("object"!=typeof t.commentThread)throw TypeError(".CommentsV2AddCommentMessage.commentThread: object expected");e.commentThread=r.CommentsThreadDescriptor.fromObject(t.commentThread)}return e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentThreadId="",n.content="",n.documentId="",n.commentId="",n.createdAt="",n.userId="",n.attributes="",n.commentThread=null),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.content&&t.hasOwnProperty("content")&&(n.content=t.content),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.commentId&&t.hasOwnProperty("commentId")&&(n.commentId=t.commentId),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),null!=t.userId&&t.hasOwnProperty("userId")&&(n.userId=t.userId),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),null!=t.commentThread&&t.hasOwnProperty("commentThread")&&(n.commentThread=r.CommentsThreadDescriptor.toObject(t.commentThread,e)),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2AddCommentMessage"},s}(),r.CommentsV2AddCommentThreadMessage=function(){function s(t){if(this.comments=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.documentId="",s.prototype.commentThreadId="",s.prototype.context="",s.prototype.createdAt="",s.prototype.resolvedAt="",s.prototype.resolvedBy="",s.prototype.attributes="",s.prototype.deletedAt="",s.prototype.comments=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(10).string(t.documentId),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(18).string(t.commentThreadId),null!=t.context&&Object.hasOwnProperty.call(t,"context")&&n.uint32(26).string(t.context),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(34).string(t.createdAt),null!=t.resolvedAt&&Object.hasOwnProperty.call(t,"resolvedAt")&&n.uint32(42).string(t.resolvedAt),null!=t.resolvedBy&&Object.hasOwnProperty.call(t,"resolvedBy")&&n.uint32(50).string(t.resolvedBy),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(58).string(t.attributes),null!=t.deletedAt&&Object.hasOwnProperty.call(t,"deletedAt")&&n.uint32(66).string(t.deletedAt),null!=t.comments&&t.comments.length)for(var s=0;s<t.comments.length;++s)r.CommentDescriptor.encode(t.comments[s],n.uint32(74).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2AddCommentThreadMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.documentId=e.string();break;case 2:i.commentThreadId=e.string();break;case 3:i.context=e.string();break;case 4:i.createdAt=e.string();break;case 5:i.resolvedAt=e.string();break;case 6:i.resolvedBy=e.string();break;case 7:i.attributes=e.string();break;case 8:i.deletedAt=e.string();break;case 9:i.comments&&i.comments.length||(i.comments=[]),i.comments.push(r.CommentDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId))return"documentId: string expected";if(null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId))return"commentThreadId: string expected";if(null!=t.context&&t.hasOwnProperty("context")&&!n.isString(t.context))return"context: string expected";if(null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt))return"createdAt: string expected";if(null!=t.resolvedAt&&t.hasOwnProperty("resolvedAt")&&!n.isString(t.resolvedAt))return"resolvedAt: string expected";if(null!=t.resolvedBy&&t.hasOwnProperty("resolvedBy")&&!n.isString(t.resolvedBy))return"resolvedBy: string expected";if(null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes))return"attributes: string expected";if(null!=t.deletedAt&&t.hasOwnProperty("deletedAt")&&!n.isString(t.deletedAt))return"deletedAt: string expected";if(null!=t.comments&&t.hasOwnProperty("comments")){if(!Array.isArray(t.comments))return"comments: array expected";for(var e=0;e<t.comments.length;++e){var s=r.CommentDescriptor.verify(t.comments[e]);if(s)return"comments."+s}}return null},s.fromObject=function(t){if(t instanceof r.CommentsV2AddCommentThreadMessage)return t;var e=new r.CommentsV2AddCommentThreadMessage;if(null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.context&&(e.context=String(t.context)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),null!=t.resolvedAt&&(e.resolvedAt=String(t.resolvedAt)),null!=t.resolvedBy&&(e.resolvedBy=String(t.resolvedBy)),null!=t.attributes&&(e.attributes=String(t.attributes)),null!=t.deletedAt&&(e.deletedAt=String(t.deletedAt)),t.comments){if(!Array.isArray(t.comments))throw TypeError(".CommentsV2AddCommentThreadMessage.comments: array expected");e.comments=[];for(var n=0;n<t.comments.length;++n){if("object"!=typeof t.comments[n])throw TypeError(".CommentsV2AddCommentThreadMessage.comments: object expected");e.comments[n]=r.CommentDescriptor.fromObject(t.comments[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.comments=[]),e.defaults&&(n.documentId="",n.commentThreadId="",n.context="",n.createdAt="",n.resolvedAt="",n.resolvedBy="",n.attributes="",n.deletedAt=""),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.context&&t.hasOwnProperty("context")&&(n.context=t.context),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),null!=t.resolvedAt&&t.hasOwnProperty("resolvedAt")&&(n.resolvedAt=t.resolvedAt),null!=t.resolvedBy&&t.hasOwnProperty("resolvedBy")&&(n.resolvedBy=t.resolvedBy),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),null!=t.deletedAt&&t.hasOwnProperty("deletedAt")&&(n.deletedAt=t.deletedAt),t.comments&&t.comments.length){n.comments=[];for(var s=0;s<t.comments.length;++s)n.comments[s]=r.CommentDescriptor.toObject(t.comments[s],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2AddCommentThreadMessage"},s}(),r.CommentsV2ReopenCommentThreadMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.documentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(18).string(t.documentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2ReopenCommentThreadMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.documentId=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId)?"commentThreadId: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2ReopenCommentThreadMessage)return t;var e=new r.CommentsV2ReopenCommentThreadMessage;return null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.documentId&&(e.documentId=String(t.documentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentThreadId="",n.documentId=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2ReopenCommentThreadMessage"},s}(),r.CommentsV2ResolveCommentThreadMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.documentId="",s.prototype.resolvedBy="",s.prototype.resolvedAt="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(18).string(t.documentId),null!=t.resolvedBy&&Object.hasOwnProperty.call(t,"resolvedBy")&&n.uint32(26).string(t.resolvedBy),null!=t.resolvedAt&&Object.hasOwnProperty.call(t,"resolvedAt")&&n.uint32(34).string(t.resolvedAt),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2ResolveCommentThreadMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.documentId=e.string();break;case 3:i.resolvedBy=e.string();break;case 4:i.resolvedAt=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId)?"commentThreadId: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null!=t.resolvedBy&&t.hasOwnProperty("resolvedBy")&&!n.isString(t.resolvedBy)?"resolvedBy: string expected":null!=t.resolvedAt&&t.hasOwnProperty("resolvedAt")&&!n.isString(t.resolvedAt)?"resolvedAt: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2ResolveCommentThreadMessage)return t;var e=new r.CommentsV2ResolveCommentThreadMessage;return null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.resolvedBy&&(e.resolvedBy=String(t.resolvedBy)),null!=t.resolvedAt&&(e.resolvedAt=String(t.resolvedAt)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentThreadId="",n.documentId="",n.resolvedBy="",n.resolvedAt=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.resolvedBy&&t.hasOwnProperty("resolvedBy")&&(n.resolvedBy=t.resolvedBy),null!=t.resolvedAt&&t.hasOwnProperty("resolvedAt")&&(n.resolvedAt=t.resolvedAt),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2ResolveCommentThreadMessage"},s}(),r.CommentsV2UpdateCommentThreadMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.documentId="",s.prototype.context="",s.prototype.attributes="",s.prototype.unlinkedAt="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(18).string(t.documentId),null!=t.context&&Object.hasOwnProperty.call(t,"context")&&n.uint32(26).string(t.context),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(34).string(t.attributes),null!=t.unlinkedAt&&Object.hasOwnProperty.call(t,"unlinkedAt")&&n.uint32(42).string(t.unlinkedAt),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2UpdateCommentThreadMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.documentId=e.string();break;case 3:i.context=e.string();break;case 4:i.attributes=e.string();break;case 5:i.unlinkedAt=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId)?"commentThreadId: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null!=t.context&&t.hasOwnProperty("context")&&!n.isString(t.context)?"context: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null!=t.unlinkedAt&&t.hasOwnProperty("unlinkedAt")&&!n.isString(t.unlinkedAt)?"unlinkedAt: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2UpdateCommentThreadMessage)return t;var e=new r.CommentsV2UpdateCommentThreadMessage;return null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.context&&(e.context=String(t.context)),null!=t.attributes&&(e.attributes=String(t.attributes)),null!=t.unlinkedAt&&(e.unlinkedAt=String(t.unlinkedAt)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentThreadId="",n.documentId="",n.context="",n.attributes="",n.unlinkedAt=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.context&&t.hasOwnProperty("context")&&(n.context=t.context),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),null!=t.unlinkedAt&&t.hasOwnProperty("unlinkedAt")&&(n.unlinkedAt=t.unlinkedAt),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2UpdateCommentThreadMessage"},s}(),r.CommentsV2ConnectMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.documentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(10).string(t.documentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2ConnectMessage;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?i.documentId=e.string():e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2ConnectMessage)return t;var e=new r.CommentsV2ConnectMessage;return null!=t.documentId&&(e.documentId=String(t.documentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.documentId=""),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2ConnectMessage"},s}(),r.CommentsV2GetCommentThreadMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.documentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(18).string(t.documentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2GetCommentThreadMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.documentId=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId)?"commentThreadId: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2GetCommentThreadMessage)return t;var e=new r.CommentsV2GetCommentThreadMessage;return null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.documentId&&(e.documentId=String(t.documentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentThreadId="",n.documentId=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2GetCommentThreadMessage"},s}(),r.CommentsV2GetDocumentThreadsMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.documentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(10).string(t.documentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2GetDocumentThreadsMessage;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?i.documentId=e.string():e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2GetDocumentThreadsMessage)return t;var e=new r.CommentsV2GetDocumentThreadsMessage;return null!=t.documentId&&(e.documentId=String(t.documentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.documentId=""),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2GetDocumentThreadsMessage"},s}(),r.CommentsV2RemoveCommentMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.commentId="",s.prototype.documentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.commentId&&Object.hasOwnProperty.call(t,"commentId")&&n.uint32(18).string(t.commentId),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(26).string(t.documentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2RemoveCommentMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.commentId=e.string();break;case 3:i.documentId=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId)?"commentThreadId: string expected":null!=t.commentId&&t.hasOwnProperty("commentId")&&!n.isString(t.commentId)?"commentId: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2RemoveCommentMessage)return t;var e=new r.CommentsV2RemoveCommentMessage;return null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.commentId&&(e.commentId=String(t.commentId)),null!=t.documentId&&(e.documentId=String(t.documentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentThreadId="",n.commentId="",n.documentId=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.commentId&&t.hasOwnProperty("commentId")&&(n.commentId=t.commentId),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2RemoveCommentMessage"},s}(),r.CommentsV2RemoveCommentThreadMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.documentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(18).string(t.documentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2RemoveCommentThreadMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.documentId=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId)?"commentThreadId: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2RemoveCommentThreadMessage)return t;var e=new r.CommentsV2RemoveCommentThreadMessage;return null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.documentId&&(e.documentId=String(t.documentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentThreadId="",n.documentId=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2RemoveCommentThreadMessage"},s}(),r.CommentsV2UpdateCommentMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.commentId="",s.prototype.content="",s.prototype.documentId="",s.prototype.attributes="",s.prototype.isAttributesUpdated=!1,s.prototype.commentThread=null,s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.commentId&&Object.hasOwnProperty.call(t,"commentId")&&n.uint32(18).string(t.commentId),null!=t.content&&Object.hasOwnProperty.call(t,"content")&&n.uint32(26).string(t.content),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(34).string(t.documentId),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(42).string(t.attributes),null!=t.isAttributesUpdated&&Object.hasOwnProperty.call(t,"isAttributesUpdated")&&n.uint32(48).bool(t.isAttributesUpdated),null!=t.commentThread&&Object.hasOwnProperty.call(t,"commentThread")&&r.CommentsThreadDescriptor.encode(t.commentThread,n.uint32(58).fork()).ldelim(),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2UpdateCommentMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.commentId=e.string();break;case 3:i.content=e.string();break;case 4:i.documentId=e.string();break;case 5:i.attributes=e.string();break;case 6:i.isAttributesUpdated=e.bool();break;case 7:i.commentThread=r.CommentsThreadDescriptor.decode(e,e.uint32());break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId))return"commentThreadId: string expected";if(null!=t.commentId&&t.hasOwnProperty("commentId")&&!n.isString(t.commentId))return"commentId: string expected";if(null!=t.content&&t.hasOwnProperty("content")&&!n.isString(t.content))return"content: string expected";if(null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId))return"documentId: string expected";if(null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes))return"attributes: string expected";if(null!=t.isAttributesUpdated&&t.hasOwnProperty("isAttributesUpdated")&&"boolean"!=typeof t.isAttributesUpdated)return"isAttributesUpdated: boolean expected";if(null!=t.commentThread&&t.hasOwnProperty("commentThread")){var e=r.CommentsThreadDescriptor.verify(t.commentThread);if(e)return"commentThread."+e}return null},s.fromObject=function(t){if(t instanceof r.CommentsV2UpdateCommentMessage)return t;var e=new r.CommentsV2UpdateCommentMessage;if(null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.commentId&&(e.commentId=String(t.commentId)),null!=t.content&&(e.content=String(t.content)),null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.attributes&&(e.attributes=String(t.attributes)),null!=t.isAttributesUpdated&&(e.isAttributesUpdated=Boolean(t.isAttributesUpdated)),null!=t.commentThread){if("object"!=typeof t.commentThread)throw TypeError(".CommentsV2UpdateCommentMessage.commentThread: object expected");e.commentThread=r.CommentsThreadDescriptor.fromObject(t.commentThread)}return e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentThreadId="",n.commentId="",n.content="",n.documentId="",n.attributes="",n.isAttributesUpdated=!1,n.commentThread=null),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.commentId&&t.hasOwnProperty("commentId")&&(n.commentId=t.commentId),null!=t.content&&t.hasOwnProperty("content")&&(n.content=t.content),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),null!=t.isAttributesUpdated&&t.hasOwnProperty("isAttributesUpdated")&&(n.isAttributesUpdated=t.isAttributesUpdated),null!=t.commentThread&&t.hasOwnProperty("commentThread")&&(n.commentThread=r.CommentsThreadDescriptor.toObject(t.commentThread,e)),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2UpdateCommentMessage"},s}(),r.CommentsV2AddCommentResponse=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.commentId="",s.prototype.createdAt="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.commentId&&Object.hasOwnProperty.call(t,"commentId")&&n.uint32(18).string(t.commentId),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(26).string(t.createdAt),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2AddCommentResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.commentId=e.string();break;case 3:i.createdAt=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId)?"commentThreadId: string expected":null!=t.commentId&&t.hasOwnProperty("commentId")&&!n.isString(t.commentId)?"commentId: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2AddCommentResponse)return t;var e=new r.CommentsV2AddCommentResponse;return null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.commentId&&(e.commentId=String(t.commentId)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentThreadId="",n.commentId="",n.createdAt=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.commentId&&t.hasOwnProperty("commentId")&&(n.commentId=t.commentId),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2AddCommentResponse"},s}(),r.CommentsV2AddCommentThreadResponse=function(){function s(t){if(this.comments=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.createdAt="",s.prototype.comments=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(18).string(t.createdAt),null!=t.comments&&t.comments.length)for(var s=0;s<t.comments.length;++s)r.CommentThreadAddedCommentDescriptor.encode(t.comments[s],n.uint32(26).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2AddCommentThreadResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.createdAt=e.string();break;case 3:i.comments&&i.comments.length||(i.comments=[]),i.comments.push(r.CommentThreadAddedCommentDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId))return"commentThreadId: string expected";if(null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt))return"createdAt: string expected";if(null!=t.comments&&t.hasOwnProperty("comments")){if(!Array.isArray(t.comments))return"comments: array expected";for(var e=0;e<t.comments.length;++e){var s=r.CommentThreadAddedCommentDescriptor.verify(t.comments[e]);if(s)return"comments."+s}}return null},s.fromObject=function(t){if(t instanceof r.CommentsV2AddCommentThreadResponse)return t;var e=new r.CommentsV2AddCommentThreadResponse;if(null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),t.comments){if(!Array.isArray(t.comments))throw TypeError(".CommentsV2AddCommentThreadResponse.comments: array expected");e.comments=[];for(var n=0;n<t.comments.length;++n){if("object"!=typeof t.comments[n])throw TypeError(".CommentsV2AddCommentThreadResponse.comments: object expected");e.comments[n]=r.CommentThreadAddedCommentDescriptor.fromObject(t.comments[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.comments=[]),e.defaults&&(n.commentThreadId="",n.createdAt=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),t.comments&&t.comments.length){n.comments=[];for(var s=0;s<t.comments.length;++s)n.comments[s]=r.CommentThreadAddedCommentDescriptor.toObject(t.comments[s],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2AddCommentThreadResponse"},s}(),r.CommentsV2ResolveCommentThreadResponse=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.documentId="",s.prototype.resolvedAt="",s.prototype.resolvedBy="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(18).string(t.documentId),null!=t.resolvedAt&&Object.hasOwnProperty.call(t,"resolvedAt")&&n.uint32(26).string(t.resolvedAt),null!=t.resolvedBy&&Object.hasOwnProperty.call(t,"resolvedBy")&&n.uint32(34).string(t.resolvedBy),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2ResolveCommentThreadResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.documentId=e.string();break;case 3:i.resolvedAt=e.string();break;case 4:i.resolvedBy=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId)?"commentThreadId: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null!=t.resolvedAt&&t.hasOwnProperty("resolvedAt")&&!n.isString(t.resolvedAt)?"resolvedAt: string expected":null!=t.resolvedBy&&t.hasOwnProperty("resolvedBy")&&!n.isString(t.resolvedBy)?"resolvedBy: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2ResolveCommentThreadResponse)return t;var e=new r.CommentsV2ResolveCommentThreadResponse;return null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.resolvedAt&&(e.resolvedAt=String(t.resolvedAt)),null!=t.resolvedBy&&(e.resolvedBy=String(t.resolvedBy)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentThreadId="",n.documentId="",n.resolvedAt="",n.resolvedBy=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.resolvedAt&&t.hasOwnProperty("resolvedAt")&&(n.resolvedAt=t.resolvedAt),null!=t.resolvedBy&&t.hasOwnProperty("resolvedBy")&&(n.resolvedBy=t.resolvedBy),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2ResolveCommentThreadResponse"},s}(),r.CommentsV2ConnectResponse=function(){function s(t){if(this.threads=[],this.threadsV2=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.channel="",s.prototype.threads=n.emptyArray,s.prototype.threadsV2=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.channel&&Object.hasOwnProperty.call(t,"channel")&&n.uint32(10).string(t.channel),null!=t.threads&&t.threads.length)for(var s=0;s<t.threads.length;++s)n.uint32(18).string(t.threads[s]);if(null!=t.threadsV2&&t.threadsV2.length)for(s=0;s<t.threadsV2.length;++s)r.CommentsThreadDescriptor.encode(t.threadsV2[s],n.uint32(26).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2ConnectResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.channel=e.string();break;case 2:i.threads&&i.threads.length||(i.threads=[]),i.threads.push(e.string());break;case 3:i.threadsV2&&i.threadsV2.length||(i.threadsV2=[]),i.threadsV2.push(r.CommentsThreadDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.channel&&t.hasOwnProperty("channel")&&!n.isString(t.channel))return"channel: string expected";if(null!=t.threads&&t.hasOwnProperty("threads")){if(!Array.isArray(t.threads))return"threads: array expected";for(var e=0;e<t.threads.length;++e)if(!n.isString(t.threads[e]))return"threads: string[] expected"}if(null!=t.threadsV2&&t.hasOwnProperty("threadsV2")){if(!Array.isArray(t.threadsV2))return"threadsV2: array expected";for(e=0;e<t.threadsV2.length;++e){var s=r.CommentsThreadDescriptor.verify(t.threadsV2[e]);if(s)return"threadsV2."+s}}return null},s.fromObject=function(t){if(t instanceof r.CommentsV2ConnectResponse)return t;var e=new r.CommentsV2ConnectResponse;if(null!=t.channel&&(e.channel=String(t.channel)),t.threads){if(!Array.isArray(t.threads))throw TypeError(".CommentsV2ConnectResponse.threads: array expected");e.threads=[];for(var n=0;n<t.threads.length;++n)e.threads[n]=String(t.threads[n])}if(t.threadsV2){if(!Array.isArray(t.threadsV2))throw TypeError(".CommentsV2ConnectResponse.threadsV2: array expected");for(e.threadsV2=[],n=0;n<t.threadsV2.length;++n){if("object"!=typeof t.threadsV2[n])throw TypeError(".CommentsV2ConnectResponse.threadsV2: object expected");e.threadsV2[n]=r.CommentsThreadDescriptor.fromObject(t.threadsV2[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.threads=[],n.threadsV2=[]),e.defaults&&(n.channel=""),null!=t.channel&&t.hasOwnProperty("channel")&&(n.channel=t.channel),t.threads&&t.threads.length){n.threads=[];for(var s=0;s<t.threads.length;++s)n.threads[s]=t.threads[s]}if(t.threadsV2&&t.threadsV2.length)for(n.threadsV2=[],s=0;s<t.threadsV2.length;++s)n.threadsV2[s]=r.CommentsThreadDescriptor.toObject(t.threadsV2[s],e);return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2ConnectResponse"},s}(),r.CommentsV2GetCommentThreadResponse=function(){function s(t){if(this.comments=[],this.commentsV2=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.comments=n.emptyArray,s.prototype.commentsV2=n.emptyArray,s.prototype.resolvedAt="",s.prototype.resolvedBy="",s.prototype.context="",s.prototype.createdAt="",s.prototype.deletedAt="",s.prototype.attributes="",s.prototype.unlinkedAt="",s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.comments&&t.comments.length)for(var s=0;s<t.comments.length;++s)n.uint32(18).string(t.comments[s]);if(null!=t.commentsV2&&t.commentsV2.length)for(s=0;s<t.commentsV2.length;++s)r.CommentDescriptor.encode(t.commentsV2[s],n.uint32(26).fork()).ldelim();return null!=t.resolvedAt&&Object.hasOwnProperty.call(t,"resolvedAt")&&n.uint32(34).string(t.resolvedAt),null!=t.resolvedBy&&Object.hasOwnProperty.call(t,"resolvedBy")&&n.uint32(42).string(t.resolvedBy),null!=t.context&&Object.hasOwnProperty.call(t,"context")&&n.uint32(50).string(t.context),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(58).string(t.createdAt),null!=t.deletedAt&&Object.hasOwnProperty.call(t,"deletedAt")&&n.uint32(66).string(t.deletedAt),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(74).string(t.attributes),null!=t.unlinkedAt&&Object.hasOwnProperty.call(t,"unlinkedAt")&&n.uint32(82).string(t.unlinkedAt),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2GetCommentThreadResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.comments&&i.comments.length||(i.comments=[]),i.comments.push(e.string());break;case 3:i.commentsV2&&i.commentsV2.length||(i.commentsV2=[]),i.commentsV2.push(r.CommentDescriptor.decode(e,e.uint32()));break;case 4:i.resolvedAt=e.string();break;case 5:i.resolvedBy=e.string();break;case 6:i.context=e.string();break;case 7:i.createdAt=e.string();break;case 8:i.deletedAt=e.string();break;case 9:i.attributes=e.string();break;case 10:i.unlinkedAt=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId))return"commentThreadId: string expected";if(null!=t.comments&&t.hasOwnProperty("comments")){if(!Array.isArray(t.comments))return"comments: array expected";for(var e=0;e<t.comments.length;++e)if(!n.isString(t.comments[e]))return"comments: string[] expected"}if(null!=t.commentsV2&&t.hasOwnProperty("commentsV2")){if(!Array.isArray(t.commentsV2))return"commentsV2: array expected";for(e=0;e<t.commentsV2.length;++e){var s=r.CommentDescriptor.verify(t.commentsV2[e]);if(s)return"commentsV2."+s}}return null!=t.resolvedAt&&t.hasOwnProperty("resolvedAt")&&!n.isString(t.resolvedAt)?"resolvedAt: string expected":null!=t.resolvedBy&&t.hasOwnProperty("resolvedBy")&&!n.isString(t.resolvedBy)?"resolvedBy: string expected":null!=t.context&&t.hasOwnProperty("context")&&!n.isString(t.context)?"context: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null!=t.deletedAt&&t.hasOwnProperty("deletedAt")&&!n.isString(t.deletedAt)?"deletedAt: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null!=t.unlinkedAt&&t.hasOwnProperty("unlinkedAt")&&!n.isString(t.unlinkedAt)?"unlinkedAt: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2GetCommentThreadResponse)return t;var e=new r.CommentsV2GetCommentThreadResponse;if(null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),t.comments){if(!Array.isArray(t.comments))throw TypeError(".CommentsV2GetCommentThreadResponse.comments: array expected");e.comments=[];for(var n=0;n<t.comments.length;++n)e.comments[n]=String(t.comments[n])}if(t.commentsV2){if(!Array.isArray(t.commentsV2))throw TypeError(".CommentsV2GetCommentThreadResponse.commentsV2: array expected");for(e.commentsV2=[],n=0;n<t.commentsV2.length;++n){if("object"!=typeof t.commentsV2[n])throw TypeError(".CommentsV2GetCommentThreadResponse.commentsV2: object expected");e.commentsV2[n]=r.CommentDescriptor.fromObject(t.commentsV2[n])}}return null!=t.resolvedAt&&(e.resolvedAt=String(t.resolvedAt)),null!=t.resolvedBy&&(e.resolvedBy=String(t.resolvedBy)),null!=t.context&&(e.context=String(t.context)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),null!=t.deletedAt&&(e.deletedAt=String(t.deletedAt)),null!=t.attributes&&(e.attributes=String(t.attributes)),null!=t.unlinkedAt&&(e.unlinkedAt=String(t.unlinkedAt)),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.comments=[],n.commentsV2=[]),e.defaults&&(n.commentThreadId="",n.resolvedAt="",n.resolvedBy="",n.context="",n.createdAt="",n.deletedAt="",n.attributes="",n.unlinkedAt=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),t.comments&&t.comments.length){n.comments=[];for(var s=0;s<t.comments.length;++s)n.comments[s]=t.comments[s]}if(t.commentsV2&&t.commentsV2.length)for(n.commentsV2=[],s=0;s<t.commentsV2.length;++s)n.commentsV2[s]=r.CommentDescriptor.toObject(t.commentsV2[s],e);return null!=t.resolvedAt&&t.hasOwnProperty("resolvedAt")&&(n.resolvedAt=t.resolvedAt),null!=t.resolvedBy&&t.hasOwnProperty("resolvedBy")&&(n.resolvedBy=t.resolvedBy),null!=t.context&&t.hasOwnProperty("context")&&(n.context=t.context),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),null!=t.deletedAt&&t.hasOwnProperty("deletedAt")&&(n.deletedAt=t.deletedAt),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),null!=t.unlinkedAt&&t.hasOwnProperty("unlinkedAt")&&(n.unlinkedAt=t.unlinkedAt),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2GetCommentThreadResponse"},s}(),r.CommentsV2GetDocumentThreadsResponse=function(){function s(t){if(this.threads=[],this.threadsV2=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.threads=n.emptyArray,s.prototype.threadsV2=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.threads&&t.threads.length)for(var s=0;s<t.threads.length;++s)n.uint32(10).string(t.threads[s]);if(null!=t.threadsV2&&t.threadsV2.length)for(s=0;s<t.threadsV2.length;++s)r.CommentsThreadDescriptor.encode(t.threadsV2[s],n.uint32(18).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2GetDocumentThreadsResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.threads&&i.threads.length||(i.threads=[]),i.threads.push(e.string());break;case 2:i.threadsV2&&i.threadsV2.length||(i.threadsV2=[]),i.threadsV2.push(r.CommentsThreadDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.threads&&t.hasOwnProperty("threads")){if(!Array.isArray(t.threads))return"threads: array expected";for(var e=0;e<t.threads.length;++e)if(!n.isString(t.threads[e]))return"threads: string[] expected"}if(null!=t.threadsV2&&t.hasOwnProperty("threadsV2")){if(!Array.isArray(t.threadsV2))return"threadsV2: array expected";for(e=0;e<t.threadsV2.length;++e){var s=r.CommentsThreadDescriptor.verify(t.threadsV2[e]);if(s)return"threadsV2."+s}}return null},s.fromObject=function(t){if(t instanceof r.CommentsV2GetDocumentThreadsResponse)return t;var e=new r.CommentsV2GetDocumentThreadsResponse;if(t.threads){if(!Array.isArray(t.threads))throw TypeError(".CommentsV2GetDocumentThreadsResponse.threads: array expected");e.threads=[];for(var n=0;n<t.threads.length;++n)e.threads[n]=String(t.threads[n])}if(t.threadsV2){if(!Array.isArray(t.threadsV2))throw TypeError(".CommentsV2GetDocumentThreadsResponse.threadsV2: array expected");for(e.threadsV2=[],n=0;n<t.threadsV2.length;++n){if("object"!=typeof t.threadsV2[n])throw TypeError(".CommentsV2GetDocumentThreadsResponse.threadsV2: object expected");e.threadsV2[n]=r.CommentsThreadDescriptor.fromObject(t.threadsV2[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.threads=[],n.threadsV2=[]),t.threads&&t.threads.length){n.threads=[];for(var s=0;s<t.threads.length;++s)n.threads[s]=t.threads[s]}if(t.threadsV2&&t.threadsV2.length)for(n.threadsV2=[],s=0;s<t.threadsV2.length;++s)n.threadsV2[s]=r.CommentsThreadDescriptor.toObject(t.threadsV2[s],e);return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2GetDocumentThreadsResponse"},s}(),r.KeyValueDescriptor=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.key="",s.prototype.value="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.key&&Object.hasOwnProperty.call(t,"key")&&n.uint32(10).string(t.key),null!=t.value&&Object.hasOwnProperty.call(t,"value")&&n.uint32(18).string(t.value),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.KeyValueDescriptor;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.key=e.string();break;case 2:i.value=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.key&&t.hasOwnProperty("key")&&!n.isString(t.key)?"key: string expected":null!=t.value&&t.hasOwnProperty("value")&&!n.isString(t.value)?"value: string expected":null},s.fromObject=function(t){if(t instanceof r.KeyValueDescriptor)return t;var e=new r.KeyValueDescriptor;return null!=t.key&&(e.key=String(t.key)),null!=t.value&&(e.value=String(t.value)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.key="",n.value=""),null!=t.key&&t.hasOwnProperty("key")&&(n.key=t.key),null!=t.value&&t.hasOwnProperty("value")&&(n.value=t.value),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/KeyValueDescriptor"},s}(),r.IsEditorBundleUploadedMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.bundleVersion="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.bundleVersion&&Object.hasOwnProperty.call(t,"bundleVersion")&&n.uint32(10).string(t.bundleVersion),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.IsEditorBundleUploadedMessage;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?i.bundleVersion=e.string():e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.bundleVersion&&t.hasOwnProperty("bundleVersion")&&!n.isString(t.bundleVersion)?"bundleVersion: string expected":null},s.fromObject=function(t){if(t instanceof r.IsEditorBundleUploadedMessage)return t;var e=new r.IsEditorBundleUploadedMessage;return null!=t.bundleVersion&&(e.bundleVersion=String(t.bundleVersion)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.bundleVersion=""),null!=t.bundleVersion&&t.hasOwnProperty("bundleVersion")&&(n.bundleVersion=t.bundleVersion),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/IsEditorBundleUploadedMessage"},s}(),r.IsEditorBundleUploadedResponse=function(){function n(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return n.prototype.isUploaded=!1,n.create=function(t){return new n(t)},n.encode=function(t,n){return n||(n=e.create()),null!=t.isUploaded&&Object.hasOwnProperty.call(t,"isUploaded")&&n.uint32(8).bool(t.isUploaded),n},n.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},n.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.IsEditorBundleUploadedResponse;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?i.isUploaded=e.bool():e.skipType(7&a)}return i},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.isUploaded&&t.hasOwnProperty("isUploaded")&&"boolean"!=typeof t.isUploaded?"isUploaded: boolean expected":null},n.fromObject=function(t){if(t instanceof r.IsEditorBundleUploadedResponse)return t;var e=new r.IsEditorBundleUploadedResponse;return null!=t.isUploaded&&(e.isUploaded=Boolean(t.isUploaded)),e},n.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.isUploaded=!1),null!=t.isUploaded&&t.hasOwnProperty("isUploaded")&&(n.isUploaded=t.isUploaded),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},n.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/IsEditorBundleUploadedResponse"},n}(),r.RevisionDescriptor=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.revisionId="",s.prototype.name="",s.prototype.creatorId="",s.prototype.authorsIds="",s.prototype.diffData="",s.prototype.createdAt="",s.prototype.attributes="",s.prototype.toVersion=0,s.prototype.fromVersion=0,s.prototype.isEmptyCurrent=!1,s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.revisionId&&Object.hasOwnProperty.call(t,"revisionId")&&n.uint32(10).string(t.revisionId),null!=t.name&&Object.hasOwnProperty.call(t,"name")&&n.uint32(18).string(t.name),null!=t.creatorId&&Object.hasOwnProperty.call(t,"creatorId")&&n.uint32(26).string(t.creatorId),null!=t.authorsIds&&Object.hasOwnProperty.call(t,"authorsIds")&&n.uint32(34).string(t.authorsIds),null!=t.diffData&&Object.hasOwnProperty.call(t,"diffData")&&n.uint32(42).string(t.diffData),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(50).string(t.createdAt),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(58).string(t.attributes),null!=t.toVersion&&Object.hasOwnProperty.call(t,"toVersion")&&n.uint32(64).uint32(t.toVersion),null!=t.fromVersion&&Object.hasOwnProperty.call(t,"fromVersion")&&n.uint32(72).uint32(t.fromVersion),null!=t.isEmptyCurrent&&Object.hasOwnProperty.call(t,"isEmptyCurrent")&&n.uint32(80).bool(t.isEmptyCurrent),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.RevisionDescriptor;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.revisionId=e.string();break;case 2:i.name=e.string();break;case 3:i.creatorId=e.string();break;case 4:i.authorsIds=e.string();break;case 5:i.diffData=e.string();break;case 6:i.createdAt=e.string();break;case 7:i.attributes=e.string();break;case 8:i.toVersion=e.uint32();break;case 9:i.fromVersion=e.uint32();break;case 10:i.isEmptyCurrent=e.bool();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.revisionId&&t.hasOwnProperty("revisionId")&&!n.isString(t.revisionId)?"revisionId: string expected":null!=t.name&&t.hasOwnProperty("name")&&!n.isString(t.name)?"name: string expected":null!=t.creatorId&&t.hasOwnProperty("creatorId")&&!n.isString(t.creatorId)?"creatorId: string expected":null!=t.authorsIds&&t.hasOwnProperty("authorsIds")&&!n.isString(t.authorsIds)?"authorsIds: string expected":null!=t.diffData&&t.hasOwnProperty("diffData")&&!n.isString(t.diffData)?"diffData: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null!=t.toVersion&&t.hasOwnProperty("toVersion")&&!n.isInteger(t.toVersion)?"toVersion: integer expected":null!=t.fromVersion&&t.hasOwnProperty("fromVersion")&&!n.isInteger(t.fromVersion)?"fromVersion: integer expected":null!=t.isEmptyCurrent&&t.hasOwnProperty("isEmptyCurrent")&&"boolean"!=typeof t.isEmptyCurrent?"isEmptyCurrent: boolean expected":null},s.fromObject=function(t){if(t instanceof r.RevisionDescriptor)return t;var e=new r.RevisionDescriptor;return null!=t.revisionId&&(e.revisionId=String(t.revisionId)),null!=t.name&&(e.name=String(t.name)),null!=t.creatorId&&(e.creatorId=String(t.creatorId)),null!=t.authorsIds&&(e.authorsIds=String(t.authorsIds)),null!=t.diffData&&(e.diffData=String(t.diffData)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),null!=t.attributes&&(e.attributes=String(t.attributes)),null!=t.toVersion&&(e.toVersion=t.toVersion>>>0),null!=t.fromVersion&&(e.fromVersion=t.fromVersion>>>0),null!=t.isEmptyCurrent&&(e.isEmptyCurrent=Boolean(t.isEmptyCurrent)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.revisionId="",n.name="",n.creatorId="",n.authorsIds="",n.diffData="",n.createdAt="",n.attributes="",n.toVersion=0,n.fromVersion=0,n.isEmptyCurrent=!1),null!=t.revisionId&&t.hasOwnProperty("revisionId")&&(n.revisionId=t.revisionId),null!=t.name&&t.hasOwnProperty("name")&&(n.name=t.name),null!=t.creatorId&&t.hasOwnProperty("creatorId")&&(n.creatorId=t.creatorId),null!=t.authorsIds&&t.hasOwnProperty("authorsIds")&&(n.authorsIds=t.authorsIds),null!=t.diffData&&t.hasOwnProperty("diffData")&&(n.diffData=t.diffData),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),null!=t.toVersion&&t.hasOwnProperty("toVersion")&&(n.toVersion=t.toVersion),null!=t.fromVersion&&t.hasOwnProperty("fromVersion")&&(n.fromVersion=t.fromVersion),null!=t.isEmptyCurrent&&t.hasOwnProperty("isEmptyCurrent")&&(n.isEmptyCurrent=t.isEmptyCurrent),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/RevisionDescriptor"},s}(),r.RevisionHistoryConnectMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.documentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(10).string(t.documentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.RevisionHistoryConnectMessage;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?i.documentId=e.string():e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null},s.fromObject=function(t){if(t instanceof r.RevisionHistoryConnectMessage)return t;var e=new r.RevisionHistoryConnectMessage;return null!=t.documentId&&(e.documentId=String(t.documentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.documentId=""),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/RevisionHistoryConnectMessage"},s}(),r.RevisionHistoryGetRevisionMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.documentId="",s.prototype.revisionId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(10).string(t.documentId),null!=t.revisionId&&Object.hasOwnProperty.call(t,"revisionId")&&n.uint32(18).string(t.revisionId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.RevisionHistoryGetRevisionMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.documentId=e.string();break;case 2:i.revisionId=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null!=t.revisionId&&t.hasOwnProperty("revisionId")&&!n.isString(t.revisionId)?"revisionId: string expected":null},s.fromObject=function(t){if(t instanceof r.RevisionHistoryGetRevisionMessage)return t;var e=new r.RevisionHistoryGetRevisionMessage;return null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.revisionId&&(e.revisionId=String(t.revisionId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.documentId="",n.revisionId=""),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.revisionId&&t.hasOwnProperty("revisionId")&&(n.revisionId=t.revisionId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/RevisionHistoryGetRevisionMessage"},s}(),r.RevisionHistoryReconnectMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.documentId="",s.prototype.requestId=0,s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(10).string(t.documentId),null!=t.requestId&&Object.hasOwnProperty.call(t,"requestId")&&n.uint32(16).uint32(t.requestId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.RevisionHistoryReconnectMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.documentId=e.string();break;case 2:i.requestId=e.uint32();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null!=t.requestId&&t.hasOwnProperty("requestId")&&!n.isInteger(t.requestId)?"requestId: integer expected":null},s.fromObject=function(t){if(t instanceof r.RevisionHistoryReconnectMessage)return t;var e=new r.RevisionHistoryReconnectMessage;return null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.requestId&&(e.requestId=t.requestId>>>0),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.documentId="",n.requestId=0),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.requestId&&t.hasOwnProperty("requestId")&&(n.requestId=t.requestId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/RevisionHistoryReconnectMessage"},s}(),r.RevisionHistoryUpdateRevisionsMessage=function(){function s(t){if(this.revisions=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.documentId="",s.prototype.requestId=0,s.prototype.revisions=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(10).string(t.documentId),null!=t.requestId&&Object.hasOwnProperty.call(t,"requestId")&&n.uint32(16).uint32(t.requestId),null!=t.revisions&&t.revisions.length)for(var s=0;s<t.revisions.length;++s)r.RevisionDescriptor.encode(t.revisions[s],n.uint32(26).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.RevisionHistoryUpdateRevisionsMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.documentId=e.string();break;case 2:i.requestId=e.uint32();break;case 3:i.revisions&&i.revisions.length||(i.revisions=[]),i.revisions.push(r.RevisionDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId))return"documentId: string expected";if(null!=t.requestId&&t.hasOwnProperty("requestId")&&!n.isInteger(t.requestId))return"requestId: integer expected";if(null!=t.revisions&&t.hasOwnProperty("revisions")){if(!Array.isArray(t.revisions))return"revisions: array expected";for(var e=0;e<t.revisions.length;++e){var s=r.RevisionDescriptor.verify(t.revisions[e]);if(s)return"revisions."+s}}return null},s.fromObject=function(t){if(t instanceof r.RevisionHistoryUpdateRevisionsMessage)return t;var e=new r.RevisionHistoryUpdateRevisionsMessage;if(null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.requestId&&(e.requestId=t.requestId>>>0),t.revisions){if(!Array.isArray(t.revisions))throw TypeError(".RevisionHistoryUpdateRevisionsMessage.revisions: array expected");e.revisions=[];for(var n=0;n<t.revisions.length;++n){if("object"!=typeof t.revisions[n])throw TypeError(".RevisionHistoryUpdateRevisionsMessage.revisions: object expected");e.revisions[n]=r.RevisionDescriptor.fromObject(t.revisions[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.revisions=[]),e.defaults&&(n.documentId="",n.requestId=0),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.requestId&&t.hasOwnProperty("requestId")&&(n.requestId=t.requestId),t.revisions&&t.revisions.length){n.revisions=[];for(var s=0;s<t.revisions.length;++s)n.revisions[s]=r.RevisionDescriptor.toObject(t.revisions[s],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/RevisionHistoryUpdateRevisionsMessage"},s}(),r.RevisionHistoryConnectResponse=function(){function s(t){if(this.revisions=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.channel="",s.prototype.requestId=0,s.prototype.revisions=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.channel&&Object.hasOwnProperty.call(t,"channel")&&n.uint32(10).string(t.channel),null!=t.requestId&&Object.hasOwnProperty.call(t,"requestId")&&n.uint32(16).uint32(t.requestId),null!=t.revisions&&t.revisions.length)for(var s=0;s<t.revisions.length;++s)r.RevisionDescriptor.encode(t.revisions[s],n.uint32(26).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.RevisionHistoryConnectResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.channel=e.string();break;case 2:i.requestId=e.uint32();break;case 3:i.revisions&&i.revisions.length||(i.revisions=[]),i.revisions.push(r.RevisionDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.channel&&t.hasOwnProperty("channel")&&!n.isString(t.channel))return"channel: string expected";if(null!=t.requestId&&t.hasOwnProperty("requestId")&&!n.isInteger(t.requestId))return"requestId: integer expected";if(null!=t.revisions&&t.hasOwnProperty("revisions")){if(!Array.isArray(t.revisions))return"revisions: array expected";for(var e=0;e<t.revisions.length;++e){var s=r.RevisionDescriptor.verify(t.revisions[e]);if(s)return"revisions."+s}}return null},s.fromObject=function(t){if(t instanceof r.RevisionHistoryConnectResponse)return t;var e=new r.RevisionHistoryConnectResponse;if(null!=t.channel&&(e.channel=String(t.channel)),null!=t.requestId&&(e.requestId=t.requestId>>>0),t.revisions){if(!Array.isArray(t.revisions))throw TypeError(".RevisionHistoryConnectResponse.revisions: array expected");e.revisions=[];for(var n=0;n<t.revisions.length;++n){if("object"!=typeof t.revisions[n])throw TypeError(".RevisionHistoryConnectResponse.revisions: object expected");e.revisions[n]=r.RevisionDescriptor.fromObject(t.revisions[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.revisions=[]),e.defaults&&(n.channel="",n.requestId=0),null!=t.channel&&t.hasOwnProperty("channel")&&(n.channel=t.channel),null!=t.requestId&&t.hasOwnProperty("requestId")&&(n.requestId=t.requestId),t.revisions&&t.revisions.length){n.revisions=[];for(var s=0;s<t.revisions.length;++s)n.revisions[s]=r.RevisionDescriptor.toObject(t.revisions[s],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/RevisionHistoryConnectResponse"},s}(),r.RevisionHistoryGetRevisionResponse=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.revisionId="",s.prototype.name="",s.prototype.creatorId="",s.prototype.authorsIds="",s.prototype.diffData="",s.prototype.createdAt="",s.prototype.attributes="",s.prototype.toVersion=0,s.prototype.fromVersion=0,s.prototype.isEmptyCurrent=!1,s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.revisionId&&Object.hasOwnProperty.call(t,"revisionId")&&n.uint32(10).string(t.revisionId),null!=t.name&&Object.hasOwnProperty.call(t,"name")&&n.uint32(18).string(t.name),null!=t.creatorId&&Object.hasOwnProperty.call(t,"creatorId")&&n.uint32(26).string(t.creatorId),null!=t.authorsIds&&Object.hasOwnProperty.call(t,"authorsIds")&&n.uint32(34).string(t.authorsIds),null!=t.diffData&&Object.hasOwnProperty.call(t,"diffData")&&n.uint32(42).string(t.diffData),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(50).string(t.createdAt),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(58).string(t.attributes),null!=t.toVersion&&Object.hasOwnProperty.call(t,"toVersion")&&n.uint32(64).uint32(t.toVersion),null!=t.fromVersion&&Object.hasOwnProperty.call(t,"fromVersion")&&n.uint32(72).uint32(t.fromVersion),null!=t.isEmptyCurrent&&Object.hasOwnProperty.call(t,"isEmptyCurrent")&&n.uint32(80).bool(t.isEmptyCurrent),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.RevisionHistoryGetRevisionResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.revisionId=e.string();break;case 2:i.name=e.string();break;case 3:i.creatorId=e.string();break;case 4:i.authorsIds=e.string();break;case 5:i.diffData=e.string();break;case 6:i.createdAt=e.string();break;case 7:i.attributes=e.string();break;case 8:i.toVersion=e.uint32();break;case 9:i.fromVersion=e.uint32();break;case 10:i.isEmptyCurrent=e.bool();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.revisionId&&t.hasOwnProperty("revisionId")&&!n.isString(t.revisionId)?"revisionId: string expected":null!=t.name&&t.hasOwnProperty("name")&&!n.isString(t.name)?"name: string expected":null!=t.creatorId&&t.hasOwnProperty("creatorId")&&!n.isString(t.creatorId)?"creatorId: string expected":null!=t.authorsIds&&t.hasOwnProperty("authorsIds")&&!n.isString(t.authorsIds)?"authorsIds: string expected":null!=t.diffData&&t.hasOwnProperty("diffData")&&!n.isString(t.diffData)?"diffData: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null!=t.toVersion&&t.hasOwnProperty("toVersion")&&!n.isInteger(t.toVersion)?"toVersion: integer expected":null!=t.fromVersion&&t.hasOwnProperty("fromVersion")&&!n.isInteger(t.fromVersion)?"fromVersion: integer expected":null!=t.isEmptyCurrent&&t.hasOwnProperty("isEmptyCurrent")&&"boolean"!=typeof t.isEmptyCurrent?"isEmptyCurrent: boolean expected":null},s.fromObject=function(t){if(t instanceof r.RevisionHistoryGetRevisionResponse)return t;var e=new r.RevisionHistoryGetRevisionResponse;return null!=t.revisionId&&(e.revisionId=String(t.revisionId)),null!=t.name&&(e.name=String(t.name)),null!=t.creatorId&&(e.creatorId=String(t.creatorId)),null!=t.authorsIds&&(e.authorsIds=String(t.authorsIds)),null!=t.diffData&&(e.diffData=String(t.diffData)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),null!=t.attributes&&(e.attributes=String(t.attributes)),null!=t.toVersion&&(e.toVersion=t.toVersion>>>0),null!=t.fromVersion&&(e.fromVersion=t.fromVersion>>>0),null!=t.isEmptyCurrent&&(e.isEmptyCurrent=Boolean(t.isEmptyCurrent)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.revisionId="",n.name="",n.creatorId="",n.authorsIds="",n.diffData="",n.createdAt="",n.attributes="",n.toVersion=0,n.fromVersion=0,n.isEmptyCurrent=!1),null!=t.revisionId&&t.hasOwnProperty("revisionId")&&(n.revisionId=t.revisionId),null!=t.name&&t.hasOwnProperty("name")&&(n.name=t.name),null!=t.creatorId&&t.hasOwnProperty("creatorId")&&(n.creatorId=t.creatorId),null!=t.authorsIds&&t.hasOwnProperty("authorsIds")&&(n.authorsIds=t.authorsIds),null!=t.diffData&&t.hasOwnProperty("diffData")&&(n.diffData=t.diffData),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),null!=t.toVersion&&t.hasOwnProperty("toVersion")&&(n.toVersion=t.toVersion),null!=t.fromVersion&&t.hasOwnProperty("fromVersion")&&(n.fromVersion=t.fromVersion),null!=t.isEmptyCurrent&&t.hasOwnProperty("isEmptyCurrent")&&(n.isEmptyCurrent=t.isEmptyCurrent),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/RevisionHistoryGetRevisionResponse"},s}(),r.RevisionHistoryUpdateRevisionsResponse=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.requestId=0,s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.requestId&&Object.hasOwnProperty.call(t,"requestId")&&n.uint32(8).uint32(t.requestId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.RevisionHistoryUpdateRevisionsResponse;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?i.requestId=e.uint32():e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.requestId&&t.hasOwnProperty("requestId")&&!n.isInteger(t.requestId)?"requestId: integer expected":null},s.fromObject=function(t){if(t instanceof r.RevisionHistoryUpdateRevisionsResponse)return t;var e=new r.RevisionHistoryUpdateRevisionsResponse;return null!=t.requestId&&(e.requestId=t.requestId>>>0),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.requestId=0),null!=t.requestId&&t.hasOwnProperty("requestId")&&(n.requestId=t.requestId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/RevisionHistoryUpdateRevisionsResponse"},s}(),r.SessionsSocketDescriptor=function(){function s(t){if(this.permissions=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.session="",s.prototype.user="",s.prototype.role="",s.prototype.permissions=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.session&&Object.hasOwnProperty.call(t,"session")&&n.uint32(10).string(t.session),null!=t.user&&Object.hasOwnProperty.call(t,"user")&&n.uint32(18).string(t.user),null!=t.role&&Object.hasOwnProperty.call(t,"role")&&n.uint32(26).string(t.role),null!=t.permissions&&t.permissions.length)for(var r=0;r<t.permissions.length;++r)n.uint32(34).string(t.permissions[r]);return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.SessionsSocketDescriptor;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.session=e.string();break;case 2:i.user=e.string();break;case 3:i.role=e.string();break;case 4:i.permissions&&i.permissions.length||(i.permissions=[]),i.permissions.push(e.string());break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.session&&t.hasOwnProperty("session")&&!n.isString(t.session))return"session: string expected";if(null!=t.user&&t.hasOwnProperty("user")&&!n.isString(t.user))return"user: string expected";if(null!=t.role&&t.hasOwnProperty("role")&&!n.isString(t.role))return"role: string expected";if(null!=t.permissions&&t.hasOwnProperty("permissions")){if(!Array.isArray(t.permissions))return"permissions: array expected";for(var e=0;e<t.permissions.length;++e)if(!n.isString(t.permissions[e]))return"permissions: string[] expected"}return null},s.fromObject=function(t){if(t instanceof r.SessionsSocketDescriptor)return t;var e=new r.SessionsSocketDescriptor;if(null!=t.session&&(e.session=String(t.session)),null!=t.user&&(e.user=String(t.user)),null!=t.role&&(e.role=String(t.role)),t.permissions){if(!Array.isArray(t.permissions))throw TypeError(".SessionsSocketDescriptor.permissions: array expected");e.permissions=[];for(var n=0;n<t.permissions.length;++n)e.permissions[n]=String(t.permissions[n])}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.permissions=[]),e.defaults&&(n.session="",n.user="",n.role=""),null!=t.session&&t.hasOwnProperty("session")&&(n.session=t.session),null!=t.user&&t.hasOwnProperty("user")&&(n.user=t.user),null!=t.role&&t.hasOwnProperty("role")&&(n.role=t.role),t.permissions&&t.permissions.length){n.permissions=[];for(var r=0;r<t.permissions.length;++r)n.permissions[r]=t.permissions[r]}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/SessionsSocketDescriptor"},s}(),r.SessionsConnectMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.sessionType=0,s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.sessionType&&Object.hasOwnProperty.call(t,"sessionType")&&n.uint32(16).uint32(t.sessionType),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.SessionsConnectMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.sessionType=e.uint32();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id)?"id: string expected":null!=t.sessionType&&t.hasOwnProperty("sessionType")&&!n.isInteger(t.sessionType)?"sessionType: integer expected":null},s.fromObject=function(t){if(t instanceof r.SessionsConnectMessage)return t;var e=new r.SessionsConnectMessage;return null!=t.id&&(e.id=String(t.id)),null!=t.sessionType&&(e.sessionType=t.sessionType>>>0),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.id="",n.sessionType=0),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),null!=t.sessionType&&t.hasOwnProperty("sessionType")&&(n.sessionType=t.sessionType),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/SessionsConnectMessage"},s}(),r.SocketConnectMessage=function(){function s(t){if(this.permissions=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.userId="",s.prototype.role="",s.prototype.permissions=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.userId&&Object.hasOwnProperty.call(t,"userId")&&n.uint32(18).string(t.userId),null!=t.role&&Object.hasOwnProperty.call(t,"role")&&n.uint32(26).string(t.role),null!=t.permissions&&t.permissions.length)for(var r=0;r<t.permissions.length;++r)n.uint32(34).string(t.permissions[r]);return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.SocketConnectMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.userId=e.string();break;case 3:i.role=e.string();break;case 4:i.permissions&&i.permissions.length||(i.permissions=[]),i.permissions.push(e.string());break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id))return"id: string expected";if(null!=t.userId&&t.hasOwnProperty("userId")&&!n.isString(t.userId))return"userId: string expected";if(null!=t.role&&t.hasOwnProperty("role")&&!n.isString(t.role))return"role: string expected";if(null!=t.permissions&&t.hasOwnProperty("permissions")){if(!Array.isArray(t.permissions))return"permissions: array expected";for(var e=0;e<t.permissions.length;++e)if(!n.isString(t.permissions[e]))return"permissions: string[] expected"}return null},s.fromObject=function(t){if(t instanceof r.SocketConnectMessage)return t;var e=new r.SocketConnectMessage;if(null!=t.id&&(e.id=String(t.id)),null!=t.userId&&(e.userId=String(t.userId)),null!=t.role&&(e.role=String(t.role)),t.permissions){if(!Array.isArray(t.permissions))throw TypeError(".SocketConnectMessage.permissions: array expected");e.permissions=[];for(var n=0;n<t.permissions.length;++n)e.permissions[n]=String(t.permissions[n])}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.permissions=[]),e.defaults&&(n.id="",n.userId="",n.role=""),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),null!=t.userId&&t.hasOwnProperty("userId")&&(n.userId=t.userId),null!=t.role&&t.hasOwnProperty("role")&&(n.role=t.role),t.permissions&&t.permissions.length){n.permissions=[];for(var r=0;r<t.permissions.length;++r)n.permissions[r]=t.permissions[r]}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/SocketConnectMessage"},s}(),r.SocketDisconnectMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.SocketDisconnectMessage;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?i.id=e.string():e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id)?"id: string expected":null},s.fromObject=function(t){if(t instanceof r.SocketDisconnectMessage)return t;var e=new r.SocketDisconnectMessage;return null!=t.id&&(e.id=String(t.id)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.id=""),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/SocketDisconnectMessage"},s}(),r.SessionsConnectResponse=function(){function s(t){if(this.sockets=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.channel="",s.prototype.sockets=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.channel&&Object.hasOwnProperty.call(t,"channel")&&n.uint32(10).string(t.channel),null!=t.sockets&&t.sockets.length)for(var s=0;s<t.sockets.length;++s)r.SessionsSocketDescriptor.encode(t.sockets[s],n.uint32(18).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.SessionsConnectResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.channel=e.string();break;case 2:i.sockets&&i.sockets.length||(i.sockets=[]),i.sockets.push(r.SessionsSocketDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.channel&&t.hasOwnProperty("channel")&&!n.isString(t.channel))return"channel: string expected";if(null!=t.sockets&&t.hasOwnProperty("sockets")){if(!Array.isArray(t.sockets))return"sockets: array expected";for(var e=0;e<t.sockets.length;++e){var s=r.SessionsSocketDescriptor.verify(t.sockets[e]);if(s)return"sockets."+s}}return null},s.fromObject=function(t){if(t instanceof r.SessionsConnectResponse)return t;var e=new r.SessionsConnectResponse;if(null!=t.channel&&(e.channel=String(t.channel)),t.sockets){if(!Array.isArray(t.sockets))throw TypeError(".SessionsConnectResponse.sockets: array expected");e.sockets=[];for(var n=0;n<t.sockets.length;++n){if("object"!=typeof t.sockets[n])throw TypeError(".SessionsConnectResponse.sockets: object expected");e.sockets[n]=r.SessionsSocketDescriptor.fromObject(t.sockets[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.sockets=[]),e.defaults&&(n.channel=""),null!=t.channel&&t.hasOwnProperty("channel")&&(n.channel=t.channel),t.sockets&&t.sockets.length){n.sockets=[];for(var s=0;s<t.sockets.length;++s)n.sockets[s]=r.SessionsSocketDescriptor.toObject(t.sockets[s],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/SessionsConnectResponse"},s}(),r.SuggestionDescriptor=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.authorId="",s.prototype.type="",s.prototype.createdAt="",s.prototype.data="",s.prototype.hasComments=!1,s.prototype.state="",s.prototype.attributes="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.authorId&&Object.hasOwnProperty.call(t,"authorId")&&n.uint32(18).string(t.authorId),null!=t.type&&Object.hasOwnProperty.call(t,"type")&&n.uint32(26).string(t.type),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(34).string(t.createdAt),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(42).string(t.data),null!=t.hasComments&&Object.hasOwnProperty.call(t,"hasComments")&&n.uint32(48).bool(t.hasComments),null!=t.state&&Object.hasOwnProperty.call(t,"state")&&n.uint32(58).string(t.state),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(66).string(t.attributes),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.SuggestionDescriptor;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.authorId=e.string();break;case 3:i.type=e.string();break;case 4:i.createdAt=e.string();break;case 5:i.data=e.string();break;case 6:i.hasComments=e.bool();break;case 7:i.state=e.string();break;case 8:i.attributes=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id)?"id: string expected":null!=t.authorId&&t.hasOwnProperty("authorId")&&!n.isString(t.authorId)?"authorId: string expected":null!=t.type&&t.hasOwnProperty("type")&&!n.isString(t.type)?"type: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isString(t.data)?"data: string expected":null!=t.hasComments&&t.hasOwnProperty("hasComments")&&"boolean"!=typeof t.hasComments?"hasComments: boolean expected":null!=t.state&&t.hasOwnProperty("state")&&!n.isString(t.state)?"state: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null},s.fromObject=function(t){if(t instanceof r.SuggestionDescriptor)return t;var e=new r.SuggestionDescriptor;return null!=t.id&&(e.id=String(t.id)),null!=t.authorId&&(e.authorId=String(t.authorId)),null!=t.type&&(e.type=String(t.type)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),null!=t.data&&(e.data=String(t.data)),null!=t.hasComments&&(e.hasComments=Boolean(t.hasComments)),null!=t.state&&(e.state=String(t.state)),null!=t.attributes&&(e.attributes=String(t.attributes)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.id="",n.authorId="",n.type="",n.createdAt="",n.data="",n.hasComments=!1,n.state="",n.attributes=""),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),null!=t.authorId&&t.hasOwnProperty("authorId")&&(n.authorId=t.authorId),null!=t.type&&t.hasOwnProperty("type")&&(n.type=t.type),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.hasComments&&t.hasOwnProperty("hasComments")&&(n.hasComments=t.hasComments),null!=t.state&&t.hasOwnProperty("state")&&(n.state=t.state),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/SuggestionDescriptor"},s}(),r.TrackChangesAddSuggestionMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.documentId="",s.prototype.type="",s.prototype.data="",s.prototype.originalSuggestionId="",s.prototype.attributes="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(18).string(t.documentId),null!=t.type&&Object.hasOwnProperty.call(t,"type")&&n.uint32(26).string(t.type),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(34).string(t.data),null!=t.originalSuggestionId&&Object.hasOwnProperty.call(t,"originalSuggestionId")&&n.uint32(42).string(t.originalSuggestionId),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(50).string(t.attributes),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.TrackChangesAddSuggestionMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.documentId=e.string();break;case 3:i.type=e.string();break;case 4:i.data=e.string();break;case 5:i.originalSuggestionId=e.string();break;case 6:i.attributes=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id)?"id: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null!=t.type&&t.hasOwnProperty("type")&&!n.isString(t.type)?"type: string expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isString(t.data)?"data: string expected":null!=t.originalSuggestionId&&t.hasOwnProperty("originalSuggestionId")&&!n.isString(t.originalSuggestionId)?"originalSuggestionId: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null},s.fromObject=function(t){if(t instanceof r.TrackChangesAddSuggestionMessage)return t;var e=new r.TrackChangesAddSuggestionMessage;return null!=t.id&&(e.id=String(t.id)),null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.type&&(e.type=String(t.type)),null!=t.data&&(e.data=String(t.data)),null!=t.originalSuggestionId&&(e.originalSuggestionId=String(t.originalSuggestionId)),null!=t.attributes&&(e.attributes=String(t.attributes)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.id="",n.documentId="",n.type="",n.data="",n.originalSuggestionId="",n.attributes=""),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.type&&t.hasOwnProperty("type")&&(n.type=t.type),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.originalSuggestionId&&t.hasOwnProperty("originalSuggestionId")&&(n.originalSuggestionId=t.originalSuggestionId),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/TrackChangesAddSuggestionMessage"},s}(),r.TrackChangesBatchUpdateSuggestionsStateMessage=function(){function s(t){if(this.ids=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.ids=n.emptyArray,s.prototype.documentId="",s.prototype.state="",s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.ids&&t.ids.length)for(var r=0;r<t.ids.length;++r)n.uint32(10).string(t.ids[r]);return null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(18).string(t.documentId),null!=t.state&&Object.hasOwnProperty.call(t,"state")&&n.uint32(26).string(t.state),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.TrackChangesBatchUpdateSuggestionsStateMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.ids&&i.ids.length||(i.ids=[]),i.ids.push(e.string());break;case 2:i.documentId=e.string();break;case 3:i.state=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.ids&&t.hasOwnProperty("ids")){if(!Array.isArray(t.ids))return"ids: array expected";for(var e=0;e<t.ids.length;++e)if(!n.isString(t.ids[e]))return"ids: string[] expected"}return null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null!=t.state&&t.hasOwnProperty("state")&&!n.isString(t.state)?"state: string expected":null},s.fromObject=function(t){if(t instanceof r.TrackChangesBatchUpdateSuggestionsStateMessage)return t;var e=new r.TrackChangesBatchUpdateSuggestionsStateMessage;if(t.ids){if(!Array.isArray(t.ids))throw TypeError(".TrackChangesBatchUpdateSuggestionsStateMessage.ids: array expected");e.ids=[];for(var n=0;n<t.ids.length;++n)e.ids[n]=String(t.ids[n])}return null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.state&&(e.state=String(t.state)),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.ids=[]),e.defaults&&(n.documentId="",n.state=""),t.ids&&t.ids.length){n.ids=[];for(var r=0;r<t.ids.length;++r)n.ids[r]=t.ids[r]}return null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.state&&t.hasOwnProperty("state")&&(n.state=t.state),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/TrackChangesBatchUpdateSuggestionsStateMessage"},s}(),r.TrackChangesConnectMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.documentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(10).string(t.documentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.TrackChangesConnectMessage;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?i.documentId=e.string():e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null},s.fromObject=function(t){if(t instanceof r.TrackChangesConnectMessage)return t;var e=new r.TrackChangesConnectMessage;return null!=t.documentId&&(e.documentId=String(t.documentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.documentId=""),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/TrackChangesConnectMessage"},s}(),r.TrackChangesGetAllSuggestionMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.documentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(10).string(t.documentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.TrackChangesGetAllSuggestionMessage;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?i.documentId=e.string():e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null},s.fromObject=function(t){if(t instanceof r.TrackChangesGetAllSuggestionMessage)return t;var e=new r.TrackChangesGetAllSuggestionMessage;return null!=t.documentId&&(e.documentId=String(t.documentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.documentId=""),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/TrackChangesGetAllSuggestionMessage"},s}(),r.TrackChangesGetSuggestionMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.documentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(18).string(t.documentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.TrackChangesGetSuggestionMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.documentId=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id)?"id: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null},s.fromObject=function(t){if(t instanceof r.TrackChangesGetSuggestionMessage)return t;var e=new r.TrackChangesGetSuggestionMessage;return null!=t.id&&(e.id=String(t.id)),null!=t.documentId&&(e.documentId=String(t.documentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.id="",n.documentId=""),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/TrackChangesGetSuggestionMessage"},s}(),r.TrackChangesUpdateSuggestionMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.documentId="",s.prototype.hasComments=!1,s.prototype.isHasCommentsModified=!1,s.prototype.state="",s.prototype.attributes="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(18).string(t.documentId),null!=t.hasComments&&Object.hasOwnProperty.call(t,"hasComments")&&n.uint32(24).bool(t.hasComments),null!=t.isHasCommentsModified&&Object.hasOwnProperty.call(t,"isHasCommentsModified")&&n.uint32(32).bool(t.isHasCommentsModified),null!=t.state&&Object.hasOwnProperty.call(t,"state")&&n.uint32(42).string(t.state),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(50).string(t.attributes),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.TrackChangesUpdateSuggestionMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.documentId=e.string();break;case 3:i.hasComments=e.bool();break;case 4:i.isHasCommentsModified=e.bool();break;case 5:i.state=e.string();break;case 6:i.attributes=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id)?"id: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null!=t.hasComments&&t.hasOwnProperty("hasComments")&&"boolean"!=typeof t.hasComments?"hasComments: boolean expected":null!=t.isHasCommentsModified&&t.hasOwnProperty("isHasCommentsModified")&&"boolean"!=typeof t.isHasCommentsModified?"isHasCommentsModified: boolean expected":null!=t.state&&t.hasOwnProperty("state")&&!n.isString(t.state)?"state: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null},s.fromObject=function(t){if(t instanceof r.TrackChangesUpdateSuggestionMessage)return t;var e=new r.TrackChangesUpdateSuggestionMessage;return null!=t.id&&(e.id=String(t.id)),null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.hasComments&&(e.hasComments=Boolean(t.hasComments)),null!=t.isHasCommentsModified&&(e.isHasCommentsModified=Boolean(t.isHasCommentsModified)),null!=t.state&&(e.state=String(t.state)),null!=t.attributes&&(e.attributes=String(t.attributes)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.id="",n.documentId="",n.hasComments=!1,n.isHasCommentsModified=!1,n.state="",n.attributes=""),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.hasComments&&t.hasOwnProperty("hasComments")&&(n.hasComments=t.hasComments),null!=t.isHasCommentsModified&&t.hasOwnProperty("isHasCommentsModified")&&(n.isHasCommentsModified=t.isHasCommentsModified),null!=t.state&&t.hasOwnProperty("state")&&(n.state=t.state),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/TrackChangesUpdateSuggestionMessage"},s}(),r.TrackChangesAddSuggestionResponse=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.authorId="",s.prototype.type="",s.prototype.createdAt="",s.prototype.data="",s.prototype.hasComments=!1,s.prototype.state="",s.prototype.attributes="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.authorId&&Object.hasOwnProperty.call(t,"authorId")&&n.uint32(18).string(t.authorId),null!=t.type&&Object.hasOwnProperty.call(t,"type")&&n.uint32(26).string(t.type),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(34).string(t.createdAt),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(42).string(t.data),null!=t.hasComments&&Object.hasOwnProperty.call(t,"hasComments")&&n.uint32(48).bool(t.hasComments),null!=t.state&&Object.hasOwnProperty.call(t,"state")&&n.uint32(58).string(t.state),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(66).string(t.attributes),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.TrackChangesAddSuggestionResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.authorId=e.string();break;case 3:i.type=e.string();break;case 4:i.createdAt=e.string();break;case 5:i.data=e.string();break;case 6:i.hasComments=e.bool();break;case 7:i.state=e.string();break;case 8:i.attributes=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id)?"id: string expected":null!=t.authorId&&t.hasOwnProperty("authorId")&&!n.isString(t.authorId)?"authorId: string expected":null!=t.type&&t.hasOwnProperty("type")&&!n.isString(t.type)?"type: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isString(t.data)?"data: string expected":null!=t.hasComments&&t.hasOwnProperty("hasComments")&&"boolean"!=typeof t.hasComments?"hasComments: boolean expected":null!=t.state&&t.hasOwnProperty("state")&&!n.isString(t.state)?"state: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null},s.fromObject=function(t){if(t instanceof r.TrackChangesAddSuggestionResponse)return t;var e=new r.TrackChangesAddSuggestionResponse;return null!=t.id&&(e.id=String(t.id)),null!=t.authorId&&(e.authorId=String(t.authorId)),null!=t.type&&(e.type=String(t.type)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),null!=t.data&&(e.data=String(t.data)),null!=t.hasComments&&(e.hasComments=Boolean(t.hasComments)),null!=t.state&&(e.state=String(t.state)),null!=t.attributes&&(e.attributes=String(t.attributes)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.id="",n.authorId="",n.type="",n.createdAt="",n.data="",n.hasComments=!1,n.state="",n.attributes=""),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),null!=t.authorId&&t.hasOwnProperty("authorId")&&(n.authorId=t.authorId),null!=t.type&&t.hasOwnProperty("type")&&(n.type=t.type),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.hasComments&&t.hasOwnProperty("hasComments")&&(n.hasComments=t.hasComments),null!=t.state&&t.hasOwnProperty("state")&&(n.state=t.state),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/TrackChangesAddSuggestionResponse"},s}(),r.TrackChangesConnectResponse=function(){function s(t){if(this.suggestions=[],this.suggestionsV2=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.channel="",s.prototype.suggestions=n.emptyArray,s.prototype.suggestionsV2=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.channel&&Object.hasOwnProperty.call(t,"channel")&&n.uint32(10).string(t.channel),null!=t.suggestions&&t.suggestions.length)for(var s=0;s<t.suggestions.length;++s)n.uint32(18).string(t.suggestions[s]);if(null!=t.suggestionsV2&&t.suggestionsV2.length)for(s=0;s<t.suggestionsV2.length;++s)r.SuggestionDescriptor.encode(t.suggestionsV2[s],n.uint32(26).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.TrackChangesConnectResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.channel=e.string();break;case 2:i.suggestions&&i.suggestions.length||(i.suggestions=[]),i.suggestions.push(e.string());break;case 3:i.suggestionsV2&&i.suggestionsV2.length||(i.suggestionsV2=[]),i.suggestionsV2.push(r.SuggestionDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.channel&&t.hasOwnProperty("channel")&&!n.isString(t.channel))return"channel: string expected";if(null!=t.suggestions&&t.hasOwnProperty("suggestions")){if(!Array.isArray(t.suggestions))return"suggestions: array expected";for(var e=0;e<t.suggestions.length;++e)if(!n.isString(t.suggestions[e]))return"suggestions: string[] expected"}if(null!=t.suggestionsV2&&t.hasOwnProperty("suggestionsV2")){if(!Array.isArray(t.suggestionsV2))return"suggestionsV2: array expected";for(e=0;e<t.suggestionsV2.length;++e){var s=r.SuggestionDescriptor.verify(t.suggestionsV2[e]);if(s)return"suggestionsV2."+s}}return null},s.fromObject=function(t){if(t instanceof r.TrackChangesConnectResponse)return t;var e=new r.TrackChangesConnectResponse;if(null!=t.channel&&(e.channel=String(t.channel)),t.suggestions){if(!Array.isArray(t.suggestions))throw TypeError(".TrackChangesConnectResponse.suggestions: array expected");e.suggestions=[];for(var n=0;n<t.suggestions.length;++n)e.suggestions[n]=String(t.suggestions[n])}if(t.suggestionsV2){if(!Array.isArray(t.suggestionsV2))throw TypeError(".TrackChangesConnectResponse.suggestionsV2: array expected");for(e.suggestionsV2=[],n=0;n<t.suggestionsV2.length;++n){if("object"!=typeof t.suggestionsV2[n])throw TypeError(".TrackChangesConnectResponse.suggestionsV2: object expected");e.suggestionsV2[n]=r.SuggestionDescriptor.fromObject(t.suggestionsV2[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.suggestions=[],n.suggestionsV2=[]),e.defaults&&(n.channel=""),null!=t.channel&&t.hasOwnProperty("channel")&&(n.channel=t.channel),t.suggestions&&t.suggestions.length){n.suggestions=[];for(var s=0;s<t.suggestions.length;++s)n.suggestions[s]=t.suggestions[s]}if(t.suggestionsV2&&t.suggestionsV2.length)for(n.suggestionsV2=[],s=0;s<t.suggestionsV2.length;++s)n.suggestionsV2[s]=r.SuggestionDescriptor.toObject(t.suggestionsV2[s],e);return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/TrackChangesConnectResponse"},s}(),r.TrackChangesGetAllSuggestionsResponse=function(){function s(t){if(this.suggestions=[],this.suggestionsV2=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.suggestions=n.emptyArray,s.prototype.suggestionsV2=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.suggestions&&t.suggestions.length)for(var s=0;s<t.suggestions.length;++s)n.uint32(10).string(t.suggestions[s]);if(null!=t.suggestionsV2&&t.suggestionsV2.length)for(s=0;s<t.suggestionsV2.length;++s)r.SuggestionDescriptor.encode(t.suggestionsV2[s],n.uint32(18).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.TrackChangesGetAllSuggestionsResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.suggestions&&i.suggestions.length||(i.suggestions=[]),i.suggestions.push(e.string());break;case 2:i.suggestionsV2&&i.suggestionsV2.length||(i.suggestionsV2=[]),i.suggestionsV2.push(r.SuggestionDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.suggestions&&t.hasOwnProperty("suggestions")){if(!Array.isArray(t.suggestions))return"suggestions: array expected";for(var e=0;e<t.suggestions.length;++e)if(!n.isString(t.suggestions[e]))return"suggestions: string[] expected"}if(null!=t.suggestionsV2&&t.hasOwnProperty("suggestionsV2")){if(!Array.isArray(t.suggestionsV2))return"suggestionsV2: array expected";for(e=0;e<t.suggestionsV2.length;++e){var s=r.SuggestionDescriptor.verify(t.suggestionsV2[e]);if(s)return"suggestionsV2."+s}}return null},s.fromObject=function(t){if(t instanceof r.TrackChangesGetAllSuggestionsResponse)return t;var e=new r.TrackChangesGetAllSuggestionsResponse;if(t.suggestions){if(!Array.isArray(t.suggestions))throw TypeError(".TrackChangesGetAllSuggestionsResponse.suggestions: array expected");e.suggestions=[];for(var n=0;n<t.suggestions.length;++n)e.suggestions[n]=String(t.suggestions[n])}if(t.suggestionsV2){if(!Array.isArray(t.suggestionsV2))throw TypeError(".TrackChangesGetAllSuggestionsResponse.suggestionsV2: array expected");for(e.suggestionsV2=[],n=0;n<t.suggestionsV2.length;++n){if("object"!=typeof t.suggestionsV2[n])throw TypeError(".TrackChangesGetAllSuggestionsResponse.suggestionsV2: object expected");e.suggestionsV2[n]=r.SuggestionDescriptor.fromObject(t.suggestionsV2[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.suggestions=[],n.suggestionsV2=[]),t.suggestions&&t.suggestions.length){n.suggestions=[];for(var s=0;s<t.suggestions.length;++s)n.suggestions[s]=t.suggestions[s]}if(t.suggestionsV2&&t.suggestionsV2.length)for(n.suggestionsV2=[],s=0;s<t.suggestionsV2.length;++s)n.suggestionsV2[s]=r.SuggestionDescriptor.toObject(t.suggestionsV2[s],e);return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/TrackChangesGetAllSuggestionsResponse"},s}(),r.TrackChangesGetSuggestionResponse=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.authorId="",s.prototype.type="",s.prototype.createdAt="",s.prototype.data="",s.prototype.hasComments=!1,s.prototype.state="",s.prototype.attributes="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.authorId&&Object.hasOwnProperty.call(t,"authorId")&&n.uint32(18).string(t.authorId),null!=t.type&&Object.hasOwnProperty.call(t,"type")&&n.uint32(26).string(t.type),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(34).string(t.createdAt),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(42).string(t.data),null!=t.hasComments&&Object.hasOwnProperty.call(t,"hasComments")&&n.uint32(48).bool(t.hasComments),null!=t.state&&Object.hasOwnProperty.call(t,"state")&&n.uint32(58).string(t.state),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(66).string(t.attributes),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.TrackChangesGetSuggestionResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.authorId=e.string();break;case 3:i.type=e.string();break;case 4:i.createdAt=e.string();break;case 5:i.data=e.string();break;case 6:i.hasComments=e.bool();break;case 7:i.state=e.string();break;case 8:i.attributes=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id)?"id: string expected":null!=t.authorId&&t.hasOwnProperty("authorId")&&!n.isString(t.authorId)?"authorId: string expected":null!=t.type&&t.hasOwnProperty("type")&&!n.isString(t.type)?"type: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isString(t.data)?"data: string expected":null!=t.hasComments&&t.hasOwnProperty("hasComments")&&"boolean"!=typeof t.hasComments?"hasComments: boolean expected":null!=t.state&&t.hasOwnProperty("state")&&!n.isString(t.state)?"state: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null},s.fromObject=function(t){if(t instanceof r.TrackChangesGetSuggestionResponse)return t;var e=new r.TrackChangesGetSuggestionResponse;return null!=t.id&&(e.id=String(t.id)),null!=t.authorId&&(e.authorId=String(t.authorId)),null!=t.type&&(e.type=String(t.type)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),null!=t.data&&(e.data=String(t.data)),null!=t.hasComments&&(e.hasComments=Boolean(t.hasComments)),null!=t.state&&(e.state=String(t.state)),null!=t.attributes&&(e.attributes=String(t.attributes)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.id="",n.authorId="",n.type="",n.createdAt="",n.data="",n.hasComments=!1,n.state="",n.attributes=""),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),null!=t.authorId&&t.hasOwnProperty("authorId")&&(n.authorId=t.authorId),null!=t.type&&t.hasOwnProperty("type")&&(n.type=t.type),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.hasComments&&t.hasOwnProperty("hasComments")&&(n.hasComments=t.hasComments),null!=t.state&&t.hasOwnProperty("state")&&(n.state=t.state),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/TrackChangesGetSuggestionResponse"},s}(),r.UserDescriptor=function(){function s(t){if(this.attributes=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.attributes=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.attributes&&t.attributes.length)for(var s=0;s<t.attributes.length;++s)r.KeyValueDescriptor.encode(t.attributes[s],n.uint32(10).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.UserDescriptor;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?(i.attributes&&i.attributes.length||(i.attributes=[]),i.attributes.push(r.KeyValueDescriptor.decode(e,e.uint32()))):e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.attributes&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var e=0;e<t.attributes.length;++e){var n=r.KeyValueDescriptor.verify(t.attributes[e]);if(n)return"attributes."+n}}return null},s.fromObject=function(t){if(t instanceof r.UserDescriptor)return t;var e=new r.UserDescriptor;if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".UserDescriptor.attributes: array expected");e.attributes=[];for(var n=0;n<t.attributes.length;++n){if("object"!=typeof t.attributes[n])throw TypeError(".UserDescriptor.attributes: object expected");e.attributes[n]=r.KeyValueDescriptor.fromObject(t.attributes[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.attributes=[]),t.attributes&&t.attributes.length){n.attributes=[];for(var s=0;s<t.attributes.length;++s)n.attributes[s]=r.KeyValueDescriptor.toObject(t.attributes[s],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/UserDescriptor"},s}(),r.GetManyUsersMessage=function(){function s(t){if(this.ids=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.ids=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.ids&&t.ids.length)for(var r=0;r<t.ids.length;++r)n.uint32(10).string(t.ids[r]);return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.GetManyUsersMessage;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?(i.ids&&i.ids.length||(i.ids=[]),i.ids.push(e.string())):e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.ids&&t.hasOwnProperty("ids")){if(!Array.isArray(t.ids))return"ids: array expected";for(var e=0;e<t.ids.length;++e)if(!n.isString(t.ids[e]))return"ids: string[] expected"}return null},s.fromObject=function(t){if(t instanceof r.GetManyUsersMessage)return t;var e=new r.GetManyUsersMessage;if(t.ids){if(!Array.isArray(t.ids))throw TypeError(".GetManyUsersMessage.ids: array expected");e.ids=[];for(var n=0;n<t.ids.length;++n)e.ids[n]=String(t.ids[n])}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.ids=[]),t.ids&&t.ids.length){n.ids=[];for(var r=0;r<t.ids.length;++r)n.ids[r]=t.ids[r]}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/GetManyUsersMessage"},s}(),r.GetUserMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.GetUserMessage;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?i.id=e.string():e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id)?"id: string expected":null},s.fromObject=function(t){if(t instanceof r.GetUserMessage)return t;var e=new r.GetUserMessage;return null!=t.id&&(e.id=String(t.id)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.id=""),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/GetUserMessage"},s}(),r.GetManyUsersResponse=function(){function s(t){if(this.users=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.users=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.users&&t.users.length)for(var s=0;s<t.users.length;++s)r.UserDescriptor.encode(t.users[s],n.uint32(10).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.GetManyUsersResponse;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?(i.users&&i.users.length||(i.users=[]),i.users.push(r.UserDescriptor.decode(e,e.uint32()))):e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.users&&t.hasOwnProperty("users")){if(!Array.isArray(t.users))return"users: array expected";for(var e=0;e<t.users.length;++e){var n=r.UserDescriptor.verify(t.users[e]);if(n)return"users."+n}}return null},s.fromObject=function(t){if(t instanceof r.GetManyUsersResponse)return t;var e=new r.GetManyUsersResponse;if(t.users){if(!Array.isArray(t.users))throw TypeError(".GetManyUsersResponse.users: array expected");e.users=[];for(var n=0;n<t.users.length;++n){if("object"!=typeof t.users[n])throw TypeError(".GetManyUsersResponse.users: object expected");e.users[n]=r.UserDescriptor.fromObject(t.users[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.users=[]),t.users&&t.users.length){n.users=[];for(var s=0;s<t.users.length;++s)n.users[s]=r.UserDescriptor.toObject(t.users[s],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/GetManyUsersResponse"},s}(),r.GetUserResponse=function(){function s(t){if(this.attributes=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.attributes=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.attributes&&t.attributes.length)for(var s=0;s<t.attributes.length;++s)r.KeyValueDescriptor.encode(t.attributes[s],n.uint32(10).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.GetUserResponse;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?(i.attributes&&i.attributes.length||(i.attributes=[]),i.attributes.push(r.KeyValueDescriptor.decode(e,e.uint32()))):e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.attributes&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var e=0;e<t.attributes.length;++e){var n=r.KeyValueDescriptor.verify(t.attributes[e]);if(n)return"attributes."+n}}return null},s.fromObject=function(t){if(t instanceof r.GetUserResponse)return t;var e=new r.GetUserResponse;if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".GetUserResponse.attributes: array expected");e.attributes=[];for(var n=0;n<t.attributes.length;++n){if("object"!=typeof t.attributes[n])throw TypeError(".GetUserResponse.attributes: object expected");e.attributes[n]=r.KeyValueDescriptor.fromObject(t.attributes[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.attributes=[]),t.attributes&&t.attributes.length){n.attributes=[];for(var s=0;s<t.attributes.length;++s)n.attributes[s]=r.KeyValueDescriptor.toObject(t.attributes[s],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/GetUserResponse"},s}(),r.ChannelMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.type=0,s.prototype.socketId="",s.prototype.data=n.newBuffer([]),s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.type&&Object.hasOwnProperty.call(t,"type")&&n.uint32(8).uint32(t.type),null!=t.socketId&&Object.hasOwnProperty.call(t,"socketId")&&n.uint32(18).string(t.socketId),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(26).bytes(t.data),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.ChannelMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.type=e.uint32();break;case 2:i.socketId=e.string();break;case 3:i.data=e.bytes();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.type&&t.hasOwnProperty("type")&&!n.isInteger(t.type)?"type: integer expected":null!=t.socketId&&t.hasOwnProperty("socketId")&&!n.isString(t.socketId)?"socketId: string expected":null!=t.data&&t.hasOwnProperty("data")&&!(t.data&&"number"==typeof t.data.length||n.isString(t.data))?"data: buffer expected":null},s.fromObject=function(t){if(t instanceof r.ChannelMessage)return t;var e=new r.ChannelMessage;return null!=t.type&&(e.type=t.type>>>0),null!=t.socketId&&(e.socketId=String(t.socketId)),null!=t.data&&("string"==typeof t.data?n.base64.decode(t.data,e.data=n.newBuffer(n.base64.length(t.data)),0):t.data.length>=0&&(e.data=t.data)),e},s.toObject=function(t,e){e||(e={});var r={};return e.defaults&&(r.type=0,r.socketId="",e.bytes===String?r.data="":(r.data=[],e.bytes!==Array&&(r.data=n.newBuffer(r.data)))),null!=t.type&&t.hasOwnProperty("type")&&(r.type=t.type),null!=t.socketId&&t.hasOwnProperty("socketId")&&(r.socketId=t.socketId),null!=t.data&&t.hasOwnProperty("data")&&(r.data=e.bytes===String?n.base64.encode(t.data,0,t.data.length):e.bytes===Array?Array.prototype.slice.call(t.data):t.data),r},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/ChannelMessage"},s}(),r.BytesBytesPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data=n.newBuffer([]),s.prototype.data1=n.newBuffer([]),s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(10).bytes(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(18).bytes(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.BytesBytesPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.bytes();break;case 2:i.data1=e.bytes();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!(t.data&&"number"==typeof t.data.length||n.isString(t.data))?"data: buffer expected":null!=t.data1&&t.hasOwnProperty("data1")&&!(t.data1&&"number"==typeof t.data1.length||n.isString(t.data1))?"data1: buffer expected":null},s.fromObject=function(t){if(t instanceof r.BytesBytesPacketDataMessage)return t;var e=new r.BytesBytesPacketDataMessage;return null!=t.data&&("string"==typeof t.data?n.base64.decode(t.data,e.data=n.newBuffer(n.base64.length(t.data)),0):t.data.length>=0&&(e.data=t.data)),null!=t.data1&&("string"==typeof t.data1?n.base64.decode(t.data1,e.data1=n.newBuffer(n.base64.length(t.data1)),0):t.data1.length>=0&&(e.data1=t.data1)),e},s.toObject=function(t,e){e||(e={});var r={};return e.defaults&&(e.bytes===String?r.data="":(r.data=[],e.bytes!==Array&&(r.data=n.newBuffer(r.data))),e.bytes===String?r.data1="":(r.data1=[],e.bytes!==Array&&(r.data1=n.newBuffer(r.data1)))),null!=t.data&&t.hasOwnProperty("data")&&(r.data=e.bytes===String?n.base64.encode(t.data,0,t.data.length):e.bytes===Array?Array.prototype.slice.call(t.data):t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(r.data1=e.bytes===String?n.base64.encode(t.data1,0,t.data1.length):e.bytes===Array?Array.prototype.slice.call(t.data1):t.data1),r},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/BytesBytesPacketDataMessage"},s}(),r.NumberBytesPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data=0,s.prototype.data1=n.newBuffer([]),s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(8).uint32(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(18).bytes(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.NumberBytesPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.uint32();break;case 2:i.data1=e.bytes();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isInteger(t.data)?"data: integer expected":null!=t.data1&&t.hasOwnProperty("data1")&&!(t.data1&&"number"==typeof t.data1.length||n.isString(t.data1))?"data1: buffer expected":null},s.fromObject=function(t){if(t instanceof r.NumberBytesPacketDataMessage)return t;var e=new r.NumberBytesPacketDataMessage;return null!=t.data&&(e.data=t.data>>>0),null!=t.data1&&("string"==typeof t.data1?n.base64.decode(t.data1,e.data1=n.newBuffer(n.base64.length(t.data1)),0):t.data1.length>=0&&(e.data1=t.data1)),e},s.toObject=function(t,e){e||(e={});var r={};return e.defaults&&(r.data=0,e.bytes===String?r.data1="":(r.data1=[],e.bytes!==Array&&(r.data1=n.newBuffer(r.data1)))),null!=t.data&&t.hasOwnProperty("data")&&(r.data=t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(r.data1=e.bytes===String?n.base64.encode(t.data1,0,t.data1.length):e.bytes===Array?Array.prototype.slice.call(t.data1):t.data1),r},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/NumberBytesPacketDataMessage"},s}(),r.NumberNumberPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data=0,s.prototype.data1=0,s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(8).uint32(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(16).uint32(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.NumberNumberPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.uint32();break;case 2:i.data1=e.uint32();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isInteger(t.data)?"data: integer expected":null!=t.data1&&t.hasOwnProperty("data1")&&!n.isInteger(t.data1)?"data1: integer expected":null},s.fromObject=function(t){if(t instanceof r.NumberNumberPacketDataMessage)return t;var e=new r.NumberNumberPacketDataMessage;return null!=t.data&&(e.data=t.data>>>0),null!=t.data1&&(e.data1=t.data1>>>0),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.data=0,n.data1=0),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(n.data1=t.data1),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/NumberNumberPacketDataMessage"},s}(),r.NumberObjectPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data=0,s.prototype.data1="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(8).uint32(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(18).string(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.NumberObjectPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.uint32();break;case 2:i.data1=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isInteger(t.data)?"data: integer expected":null!=t.data1&&t.hasOwnProperty("data1")&&!n.isString(t.data1)?"data1: string expected":null},s.fromObject=function(t){if(t instanceof r.NumberObjectPacketDataMessage)return t;var e=new r.NumberObjectPacketDataMessage;return null!=t.data&&(e.data=t.data>>>0),null!=t.data1&&(e.data1=String(t.data1)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.data=0,n.data1=""),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(n.data1=t.data1),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/NumberObjectPacketDataMessage"},s}(),r.NumberStringPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data=0,s.prototype.data1="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(8).uint32(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(18).string(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.NumberStringPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.uint32();break;case 2:i.data1=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isInteger(t.data)?"data: integer expected":null!=t.data1&&t.hasOwnProperty("data1")&&!n.isString(t.data1)?"data1: string expected":null},s.fromObject=function(t){if(t instanceof r.NumberStringPacketDataMessage)return t;var e=new r.NumberStringPacketDataMessage;return null!=t.data&&(e.data=t.data>>>0),null!=t.data1&&(e.data1=String(t.data1)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.data=0,n.data1=""),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(n.data1=t.data1),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/NumberStringPacketDataMessage"},s}(),r.ObjectBufferPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data="",s.prototype.data1=n.newBuffer([]),s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(10).string(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(18).bytes(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.ObjectBufferPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.string();break;case 2:i.data1=e.bytes();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isString(t.data)?"data: string expected":null!=t.data1&&t.hasOwnProperty("data1")&&!(t.data1&&"number"==typeof t.data1.length||n.isString(t.data1))?"data1: buffer expected":null},s.fromObject=function(t){if(t instanceof r.ObjectBufferPacketDataMessage)return t;var e=new r.ObjectBufferPacketDataMessage;return null!=t.data&&(e.data=String(t.data)),null!=t.data1&&("string"==typeof t.data1?n.base64.decode(t.data1,e.data1=n.newBuffer(n.base64.length(t.data1)),0):t.data1.length>=0&&(e.data1=t.data1)),e},s.toObject=function(t,e){e||(e={});var r={};return e.defaults&&(r.data="",e.bytes===String?r.data1="":(r.data1=[],e.bytes!==Array&&(r.data1=n.newBuffer(r.data1)))),null!=t.data&&t.hasOwnProperty("data")&&(r.data=t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(r.data1=e.bytes===String?n.base64.encode(t.data1,0,t.data1.length):e.bytes===Array?Array.prototype.slice.call(t.data1):t.data1),r},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/ObjectBufferPacketDataMessage"},s}(),r.ObjectObjectPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data="",s.prototype.data1="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(10).string(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(18).string(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.ObjectObjectPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.string();break;case 2:i.data1=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isString(t.data)?"data: string expected":null!=t.data1&&t.hasOwnProperty("data1")&&!n.isString(t.data1)?"data1: string expected":null},s.fromObject=function(t){if(t instanceof r.ObjectObjectPacketDataMessage)return t;var e=new r.ObjectObjectPacketDataMessage;return null!=t.data&&(e.data=String(t.data)),null!=t.data1&&(e.data1=String(t.data1)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.data="",n.data1=""),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(n.data1=t.data1),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/ObjectObjectPacketDataMessage"},s}(),r.PacketMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.type=0,s.prototype.id=0,s.prototype.nsp="",s.prototype.data=n.newBuffer([]),s.prototype.options=n.newBuffer([]),s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.type&&Object.hasOwnProperty.call(t,"type")&&n.uint32(8).uint32(t.type),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(16).uint32(t.id),null!=t.nsp&&Object.hasOwnProperty.call(t,"nsp")&&n.uint32(26).string(t.nsp),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(34).bytes(t.data),null!=t.options&&Object.hasOwnProperty.call(t,"options")&&n.uint32(42).bytes(t.options),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.PacketMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.type=e.uint32();break;case 2:i.id=e.uint32();break;case 3:i.nsp=e.string();break;case 4:i.data=e.bytes();break;case 5:i.options=e.bytes();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.type&&t.hasOwnProperty("type")&&!n.isInteger(t.type)?"type: integer expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isInteger(t.id)?"id: integer expected":null!=t.nsp&&t.hasOwnProperty("nsp")&&!n.isString(t.nsp)?"nsp: string expected":null!=t.data&&t.hasOwnProperty("data")&&!(t.data&&"number"==typeof t.data.length||n.isString(t.data))?"data: buffer expected":null!=t.options&&t.hasOwnProperty("options")&&!(t.options&&"number"==typeof t.options.length||n.isString(t.options))?"options: buffer expected":null},s.fromObject=function(t){if(t instanceof r.PacketMessage)return t;var e=new r.PacketMessage;return null!=t.type&&(e.type=t.type>>>0),null!=t.id&&(e.id=t.id>>>0),null!=t.nsp&&(e.nsp=String(t.nsp)),null!=t.data&&("string"==typeof t.data?n.base64.decode(t.data,e.data=n.newBuffer(n.base64.length(t.data)),0):t.data.length>=0&&(e.data=t.data)),null!=t.options&&("string"==typeof t.options?n.base64.decode(t.options,e.options=n.newBuffer(n.base64.length(t.options)),0):t.options.length>=0&&(e.options=t.options)),e},s.toObject=function(t,e){e||(e={});var r={};return e.defaults&&(r.type=0,r.id=0,r.nsp="",e.bytes===String?r.data="":(r.data=[],e.bytes!==Array&&(r.data=n.newBuffer(r.data))),e.bytes===String?r.options="":(r.options=[],e.bytes!==Array&&(r.options=n.newBuffer(r.options)))),null!=t.type&&t.hasOwnProperty("type")&&(r.type=t.type),null!=t.id&&t.hasOwnProperty("id")&&(r.id=t.id),null!=t.nsp&&t.hasOwnProperty("nsp")&&(r.nsp=t.nsp),null!=t.data&&t.hasOwnProperty("data")&&(r.data=e.bytes===String?n.base64.encode(t.data,0,t.data.length):e.bytes===Array?Array.prototype.slice.call(t.data):t.data),null!=t.options&&t.hasOwnProperty("options")&&(r.options=e.bytes===String?n.base64.encode(t.options,0,t.options.length):e.bytes===Array?Array.prototype.slice.call(t.options):t.options),r},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/PacketMessage"},s}(),r.PacketOptionsMessage=function(){function s(t){if(this.rooms=[],this.except=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.flags="",s.prototype.rooms=n.emptyArray,s.prototype.except=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.flags&&Object.hasOwnProperty.call(t,"flags")&&n.uint32(10).string(t.flags),null!=t.rooms&&t.rooms.length)for(var r=0;r<t.rooms.length;++r)n.uint32(18).string(t.rooms[r]);if(null!=t.except&&t.except.length)for(r=0;r<t.except.length;++r)n.uint32(26).string(t.except[r]);return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.PacketOptionsMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.flags=e.string();break;case 2:i.rooms&&i.rooms.length||(i.rooms=[]),i.rooms.push(e.string());break;case 3:i.except&&i.except.length||(i.except=[]),i.except.push(e.string());break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.flags&&t.hasOwnProperty("flags")&&!n.isString(t.flags))return"flags: string expected";if(null!=t.rooms&&t.hasOwnProperty("rooms")){if(!Array.isArray(t.rooms))return"rooms: array expected";for(var e=0;e<t.rooms.length;++e)if(!n.isString(t.rooms[e]))return"rooms: string[] expected"}if(null!=t.except&&t.hasOwnProperty("except")){if(!Array.isArray(t.except))return"except: array expected";for(e=0;e<t.except.length;++e)if(!n.isString(t.except[e]))return"except: string[] expected"}return null},s.fromObject=function(t){if(t instanceof r.PacketOptionsMessage)return t;var e=new r.PacketOptionsMessage;if(null!=t.flags&&(e.flags=String(t.flags)),t.rooms){if(!Array.isArray(t.rooms))throw TypeError(".PacketOptionsMessage.rooms: array expected");e.rooms=[];for(var n=0;n<t.rooms.length;++n)e.rooms[n]=String(t.rooms[n])}if(t.except){if(!Array.isArray(t.except))throw TypeError(".PacketOptionsMessage.except: array expected");for(e.except=[],n=0;n<t.except.length;++n)e.except[n]=String(t.except[n])}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.rooms=[],n.except=[]),e.defaults&&(n.flags=""),null!=t.flags&&t.hasOwnProperty("flags")&&(n.flags=t.flags),t.rooms&&t.rooms.length){n.rooms=[];for(var r=0;r<t.rooms.length;++r)n.rooms[r]=t.rooms[r]}if(t.except&&t.except.length)for(n.except=[],r=0;r<t.except.length;++r)n.except[r]=t.except[r];return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/PacketOptionsMessage"},s}(),r.StringBytesPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data="",s.prototype.data1=n.newBuffer([]),s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(10).string(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(18).bytes(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.StringBytesPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.string();break;case 2:i.data1=e.bytes();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isString(t.data)?"data: string expected":null!=t.data1&&t.hasOwnProperty("data1")&&!(t.data1&&"number"==typeof t.data1.length||n.isString(t.data1))?"data1: buffer expected":null},s.fromObject=function(t){if(t instanceof r.StringBytesPacketDataMessage)return t;var e=new r.StringBytesPacketDataMessage;return null!=t.data&&(e.data=String(t.data)),null!=t.data1&&("string"==typeof t.data1?n.base64.decode(t.data1,e.data1=n.newBuffer(n.base64.length(t.data1)),0):t.data1.length>=0&&(e.data1=t.data1)),e},s.toObject=function(t,e){e||(e={});var r={};return e.defaults&&(r.data="",e.bytes===String?r.data1="":(r.data1=[],e.bytes!==Array&&(r.data1=n.newBuffer(r.data1)))),null!=t.data&&t.hasOwnProperty("data")&&(r.data=t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(r.data1=e.bytes===String?n.base64.encode(t.data1,0,t.data1.length):e.bytes===Array?Array.prototype.slice.call(t.data1):t.data1),r},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/StringBytesPacketDataMessage"},s}(),r.StringNumberPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data="",s.prototype.data1=0,s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(10).string(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(16).uint32(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.StringNumberPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.string();break;case 2:i.data1=e.uint32();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isString(t.data)?"data: string expected":null!=t.data1&&t.hasOwnProperty("data1")&&!n.isInteger(t.data1)?"data1: integer expected":null},s.fromObject=function(t){if(t instanceof r.StringNumberPacketDataMessage)return t;var e=new r.StringNumberPacketDataMessage;return null!=t.data&&(e.data=String(t.data)),null!=t.data1&&(e.data1=t.data1>>>0),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.data="",n.data1=0),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(n.data1=t.data1),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/StringNumberPacketDataMessage"},s}(),r.StringObjectPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data="",s.prototype.data1="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(10).string(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(18).string(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.StringObjectPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.string();break;case 2:i.data1=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isString(t.data)?"data: string expected":null!=t.data1&&t.hasOwnProperty("data1")&&!n.isString(t.data1)?"data1: string expected":null},s.fromObject=function(t){if(t instanceof r.StringObjectPacketDataMessage)return t;var e=new r.StringObjectPacketDataMessage;return null!=t.data&&(e.data=String(t.data)),null!=t.data1&&(e.data1=String(t.data1)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.data="",n.data1=""),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(n.data1=t.data1),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/StringObjectPacketDataMessage"},s}(),r.StringStringPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data="",s.prototype.data1="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(10).string(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(18).string(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.StringStringPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.string();break;case 2:i.data1=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isString(t.data)?"data: string expected":null!=t.data1&&t.hasOwnProperty("data1")&&!n.isString(t.data1)?"data1: string expected":null},s.fromObject=function(t){if(t instanceof r.StringStringPacketDataMessage)return t;var e=new r.StringStringPacketDataMessage;return null!=t.data&&(e.data=String(t.data)),null!=t.data1&&(e.data1=String(t.data1)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.data="",n.data1=""),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(n.data1=t.data1),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/StringStringPacketDataMessage"},s}(),r})(),l=d;class p{static decode(t,e){const n=h(e).decode("undefined"==typeof window?t:new Uint8Array(t));return e.fromJSON({...n})}static encode(t){const e=h(t.constructor),n=t.toJSON(),r=e.verify(n);if(r)throw Error(r);return e.encode(e.create(n)).finish()}}function h(t){return l[t.DESCRIPTOR_NAME]}class f extends i{ids;static TYPE="22";static READABLE_TYPE_NAME="getManyUsers";static DESCRIPTOR_NAME="GetManyUsersMessage";static DESCRIPTOR={fields:{ids:{id:1,type:"string",rule:"repeated"}}};constructor(t){super(),this.ids=t}toJSON(){return{ids:this.ids}}static fromJSON(t){return new f(t.ids)}}class m extends i{users;static DESCRIPTOR_NAME="GetManyUsersResponse";static DESCRIPTOR={fields:{users:{rule:"repeated",type:"UserDescriptor",id:1}}};constructor(t){super(),this.users=t}toJSON(){return{users:this.users.map(g)}}static fromJSON(t){return new m(t.users.map(y))}}function g(t){return{attributes:Object.keys(t).map(e=>({key:e,value:JSON.stringify(t[e])}))}}function y(t){return t.attributes.reduce((t,e)=>(t[e.key]=e.value?JSON.parse(e.value):null,t),{})}class b{static _SERVICE=2;constructor(t={}){this._attributes=new Map;for(const e of Object.keys(t))"id"!==e?(this._attributes.set(e,t[e]),Object.defineProperty(this,e,{enumerable:!0,configurable:!1,get:()=>this._attributes.get(e)})):this.id=t.id}static fromData(t){return new b(t)}static async get(t,e){const n=new a(e);try{const e=await t._sendRequest(b._SERVICE,a.TYPE,p.encode(n)),r=p.decode(e,c);return new b(r.attributes)}catch(t){return new b({id:e})}}static async getMany(t,e){const n=new f(e);try{const e=await t._sendRequest(b._SERVICE,f.TYPE,p.encode(n));return p.decode(e,m).users.map(t=>new b(t))}catch(t){return e.map(t=>new b({id:t}))}}}const I=b,O=Object.create(null);O.open="0",O.close="1",O.ping="2",O.pong="3",O.message="4",O.upgrade="5",O.noop="6";const v=Object.create(null);Object.keys(O).forEach(t=>{v[O[t]]=t});const w={type:"error",data:"parser error"},S="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),k="function"==typeof ArrayBuffer,A=t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,T=({type:t,data:e},n,r)=>S&&e instanceof Blob?n?r(e):_(e,r):k&&(e instanceof ArrayBuffer||A(e))?n?r(e):_(new Blob([e]),r):r(O[t]+(e||"")),_=(t,e)=>{const n=new FileReader;return n.onload=function(){const t=n.result.split(",")[1];e("b"+(t||""))},n.readAsDataURL(t)};function C(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let P;const E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",j="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let t=0;t<64;t++)j[E.charCodeAt(t)]=t;const D="function"==typeof ArrayBuffer,x=(t,e)=>{if("string"!=typeof t)return{type:"message",data:N(t,e)};const n=t.charAt(0);if("b"===n)return{type:"message",data:R(t.substring(1),e)};return v[n]?t.length>1?{type:v[n],data:t.substring(1)}:{type:v[n]}:w},R=(t,e)=>{if(D){const n=(t=>{let e,n,r,s,o,i=.75*t.length,a=t.length,c=0;"="===t[t.length-1]&&(i--,"="===t[t.length-2]&&i--);const u=new ArrayBuffer(i),d=new Uint8Array(u);for(e=0;e<a;e+=4)n=j[t.charCodeAt(e)],r=j[t.charCodeAt(e+1)],s=j[t.charCodeAt(e+2)],o=j[t.charCodeAt(e+3)],d[c++]=n<<2|r>>4,d[c++]=(15&r)<<4|s>>2,d[c++]=(3&s)<<6|63&o;return u})(t);return N(n,e)}return{base64:!0,data:t}},N=(t,e)=>"blob"===e?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer,V=String.fromCharCode(30);function M(){return new TransformStream({transform(t,e){!function(t,e){S&&t.data instanceof Blob?t.data.arrayBuffer().then(C).then(e):k&&(t.data instanceof ArrayBuffer||A(t.data))?e(C(t.data)):T(t,!1,t=>{P||(P=new TextEncoder),e(P.encode(t))})}(t,n=>{const r=n.length;let s;if(r<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,r);else if(r<65536){s=new Uint8Array(3);const t=new DataView(s.buffer);t.setUint8(0,126),t.setUint16(1,r)}else{s=new Uint8Array(9);const t=new DataView(s.buffer);t.setUint8(0,127),t.setBigUint64(1,BigInt(r))}t.data&&"string"!=typeof t.data&&(s[0]|=128),e.enqueue(s),e.enqueue(n)})}})}let B;function J(t){return t.reduce((t,e)=>t+e.length,0)}function U(t,e){if(t[0].length===e)return t.shift();const n=new Uint8Array(e);let r=0;for(let s=0;s<e;s++)n[s]=t[0][r++],r===t[0].length&&(t.shift(),r=0);return t.length&&r<t[0].length&&(t[0]=t[0].slice(r)),n}function q(t){if(t)return function(t){for(var e in q.prototype)t[e]=q.prototype[e];return t}(t)}q.prototype.on=q.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},q.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},q.prototype.off=q.prototype.removeListener=q.prototype.removeAllListeners=q.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var s=0;s<r.length;s++)if((n=r[s])===e||n.fn===e){r.splice(s,1);break}return 0===r.length&&delete this._callbacks["$"+t],this},q.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){r=0;for(var s=(n=n.slice(0)).length;r<s;++r)n[r].apply(this,e)}return this},q.prototype.emitReserved=q.prototype.emit,q.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},q.prototype.hasListeners=function(t){return!!this.listeners(t).length};const L="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function G(t,...e){return e.reduce((e,n)=>(t.hasOwnProperty(n)&&(e[n]=t[n]),e),{})}const Y=L.setTimeout,H=L.clearTimeout;function z(t,e){e.useNativeTimers?(t.setTimeoutFn=Y.bind(L),t.clearTimeoutFn=H.bind(L)):(t.setTimeoutFn=L.setTimeout.bind(L),t.clearTimeoutFn=L.clearTimeout.bind(L))}function F(t){return"string"==typeof t?function(t){let e=0,n=0;for(let r=0,s=t.length;r<s;r++)e=t.charCodeAt(r),e<128?n+=1:e<2048?n+=2:e<55296||e>=57344?n+=3:(r++,n+=4);return n}(t):Math.ceil(1.33*(t.byteLength||t.size))}class K extends Error{constructor(t,e,n){super(t),this.description=e,this.context=n,this.type="TransportError"}}class W extends q{constructor(t){super(),this.writable=!1,z(this,t),this.opts=t,this.query=t.query,this.socket=t.socket}onError(t,e,n){return super.emitReserved("error",new K(t,e,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(t){"open"===this.readyState&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const e=x(t,this.socket.binaryType);this.onPacket(e)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,e={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(e)}_hostname(){const t=this.opts.hostname;return-1===t.indexOf(":")?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(t){const e=function(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}(t);return e.length?"?"+e:""}}const Q="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),X={};let Z,$=0,tt=0;function et(t){let e="";do{e=Q[t%64]+e,t=Math.floor(t/64)}while(t>0);return e}function nt(){const t=et(+new Date);return t!==Z?($=0,Z=t):t+"."+et($++)}for(;tt<64;tt++)X[Q[tt]]=tt;let rt=!1;try{rt="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){}const st=rt;function ot(t){const e=t.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!e||st))return new XMLHttpRequest}catch(t){}if(!e)try{return new(L[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}function it(){}const at=null!=new ot({xdomain:!1}).responseType;class ct extends q{constructor(t,e){super(),z(this,e),this.opts=e,this.method=e.method||"GET",this.uri=t,this.data=void 0!==e.data?e.data:null,this.create()}create(){var t;const e=G(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this.opts.xd;const n=this.xhr=new ot(e);try{n.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let t in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(t)&&n.setRequestHeader(t,this.opts.extraHeaders[t])}}catch(t){}if("POST"===this.method)try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{n.setRequestHeader("Accept","*/*")}catch(t){}null===(t=this.opts.cookieJar)||void 0===t||t.addCookies(n),"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{var t;3===n.readyState&&(null===(t=this.opts.cookieJar)||void 0===t||t.parseCookies(n)),4===n.readyState&&(200===n.status||1223===n.status?this.onLoad():this.setTimeoutFn(()=>{this.onError("number"==typeof n.status?n.status:0)},0))},n.send(this.data)}catch(t){return void this.setTimeoutFn(()=>{this.onError(t)},0)}"undefined"!=typeof document&&(this.index=ct.requestsCount++,ct.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=it,t)try{this.xhr.abort()}catch(t){}"undefined"!=typeof document&&delete ct.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(ct.requestsCount=0,ct.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",ut);else if("function"==typeof addEventListener){addEventListener("onpagehide"in L?"pagehide":"unload",ut,!1)}function ut(){for(let t in ct.requests)ct.requests.hasOwnProperty(t)&&ct.requests[t].abort()}const dt="function"==typeof Promise&&"function"==typeof Promise.resolve?t=>Promise.resolve().then(t):(t,e)=>e(t,0),lt=L.WebSocket||L.MozWebSocket,pt="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();const ht={websocket:class extends W{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),e=this.opts.protocols,n=pt?{}:G(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=pt?new lt(t,e,n):e?new lt(t,e):new lt(t)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let e=0;e<t.length;e++){const n=t[e],r=e===t.length-1;T(n,this.supportsBinary,t=>{try{this.ws.send(t)}catch(t){}r&&dt(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",e=this.query||{};return this.opts.timestampRequests&&(e[this.opts.timestampParam]=nt()),this.supportsBinary||(e.b64=1),this.createUri(t,e)}check(){return!!lt}},webtransport:class extends W{get name(){return"webtransport"}doOpen(){"function"==typeof WebTransport&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(t=>{const e=function(t,e){B||(B=new TextDecoder);const n=[];let r=0,s=-1,o=!1;return new TransformStream({transform(i,a){for(n.push(i);;){if(0===r){if(J(n)<1)break;const t=U(n,1);o=!(128&~t[0]),s=127&t[0],r=s<126?3:126===s?1:2}else if(1===r){if(J(n)<2)break;const t=U(n,2);s=new DataView(t.buffer,t.byteOffset,t.length).getUint16(0),r=3}else if(2===r){if(J(n)<8)break;const t=U(n,8),e=new DataView(t.buffer,t.byteOffset,t.length),o=e.getUint32(0);if(o>Math.pow(2,21)-1){a.enqueue(w);break}s=o*Math.pow(2,32)+e.getUint32(4),r=3}else{if(J(n)<s)break;const t=U(n,s);a.enqueue(x(o?t:B.decode(t),e)),r=0}if(0===s||s>t){a.enqueue(w);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=t.readable.pipeThrough(e).getReader(),r=M();r.readable.pipeTo(t.writable),this.writer=r.writable.getWriter();const s=()=>{n.read().then(({done:t,value:e})=>{t||(this.onPacket(e),s())}).catch(t=>{})};s();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this.writer.write(o).then(()=>this.onOpen())})}))}write(t){this.writable=!1;for(let e=0;e<t.length;e++){const n=t[e],r=e===t.length-1;this.writer.write(n).then(()=>{r&&dt(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;null===(t=this.transport)||void 0===t||t.close()}},polling:class extends W{constructor(t){if(super(t),this.polling=!1,"undefined"!=typeof location){const e="https:"===location.protocol;let n=location.port;n||(n=e?"443":"80"),this.xd="undefined"!=typeof location&&t.hostname!==location.hostname||n!==t.port}const e=t&&t.forceBase64;this.supportsBinary=at&&!e,this.opts.withCredentials&&(this.cookieJar=void 0)}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const e=()=>{this.readyState="paused",t()};if(this.polling||!this.writable){let t=0;this.polling&&(t++,this.once("pollComplete",function(){--t||e()})),this.writable||(t++,this.once("drain",function(){--t||e()}))}else e()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){((t,e)=>{const n=t.split(V),r=[];for(let t=0;t<n.length;t++){const s=x(n[t],e);if(r.push(s),"error"===s.type)break}return r})(t,this.socket.binaryType).forEach(t=>{if("opening"===this.readyState&&"open"===t.type&&this.onOpen(),"close"===t.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(t)}),"closed"!==this.readyState&&(this.polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};"open"===this.readyState?t():this.once("open",t)}write(t){this.writable=!1,((t,e)=>{const n=t.length,r=new Array(n);let s=0;t.forEach((t,o)=>{T(t,!1,t=>{r[o]=t,++s===n&&e(r.join(V))})})})(t,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",e=this.query||{};return!1!==this.opts.timestampRequests&&(e[this.opts.timestampParam]=nt()),this.supportsBinary||e.sid||(e.b64=1),this.createUri(t,e)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new ct(this.uri(),t)}doWrite(t,e){const n=this.request({method:"POST",data:t});n.on("success",e),n.on("error",(t,e)=>{this.onError("xhr post error",t,e)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(t,e)=>{this.onError("xhr poll error",t,e)}),this.pollXhr=t}}},ft=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,mt=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function gt(t){if(t.length>2e3)throw"URI too long";const e=t,n=t.indexOf("["),r=t.indexOf("]");-1!=n&&-1!=r&&(t=t.substring(0,n)+t.substring(n,r).replace(/:/g,";")+t.substring(r,t.length));let s=ft.exec(t||""),o={},i=14;for(;i--;)o[mt[i]]=s[i]||"";return-1!=n&&-1!=r&&(o.source=e,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=function(t,e){const n=/\/{2,9}/g,r=e.replace(n,"/").split("/");"/"!=e.slice(0,1)&&0!==e.length||r.splice(0,1);"/"==e.slice(-1)&&r.splice(r.length-1,1);return r}(0,o.path),o.queryKey=function(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(t,e,r){e&&(n[e]=r)}),n}(0,o.query),o}class yt extends q{constructor(t,e={}){super(),this.binaryType="arraybuffer",this.writeBuffer=[],t&&"object"==typeof t&&(e=t,t=null),t?(t=gt(t),e.hostname=t.host,e.secure="https"===t.protocol||"wss"===t.protocol,e.port=t.port,t.query&&(e.query=t.query)):e.host&&(e.hostname=gt(e.host).host),z(this,e),this.secure=null!=e.secure?e.secure:"undefined"!=typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=e.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=e.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},e),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(t){let e={},n=t.split("&");for(let t=0,r=n.length;t<r;t++){let r=n[t].split("=");e[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return e}(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,"function"==typeof addEventListener&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const e=Object.assign({},this.opts.query);e.EIO=4,e.transport=t,this.id&&(e.sid=this.id);const n=Object.assign({},this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new ht[t](n)}open(){let t;if(this.opts.rememberUpgrade&&yt.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))t="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(t){return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",t=>this.onClose("transport close",t))}probe(t){let e=this.createTransport(t),n=!1;yt.priorWebsocketSuccess=!1;const r=()=>{n||(e.send([{type:"ping",data:"probe"}]),e.once("packet",t=>{if(!n)if("pong"===t.type&&"probe"===t.data){if(this.upgrading=!0,this.emitReserved("upgrading",e),!e)return;yt.priorWebsocketSuccess="websocket"===e.name,this.transport.pause(()=>{n||"closed"!==this.readyState&&(u(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emitReserved("upgrade",e),e=null,this.upgrading=!1,this.flush())})}else{const t=new Error("probe error");t.transport=e.name,this.emitReserved("upgradeError",t)}}))};function s(){n||(n=!0,u(),e.close(),e=null)}const o=t=>{const n=new Error("probe error: "+t);n.transport=e.name,s(),this.emitReserved("upgradeError",n)};function i(){o("transport closed")}function a(){o("socket closed")}function c(t){e&&t.name!==e.name&&s()}const u=()=>{e.removeListener("open",r),e.removeListener("error",o),e.removeListener("close",i),this.off("close",a),this.off("upgrading",c)};e.once("open",r),e.once("error",o),e.once("close",i),this.once("close",a),this.once("upgrading",c),-1!==this.upgrades.indexOf("webtransport")&&"webtransport"!==t?this.setTimeoutFn(()=>{n||e.open()},200):e.open()}onOpen(){if(this.readyState="open",yt.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade){let t=0;const e=this.upgrades.length;for(;t<e;t++)this.probe(this.upgrades[t])}}onPacket(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),this.resetPingTimeout(),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const e=new Error("server error");e.code=t.data,this.onError(e);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data)}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.maxPayload=t.maxPayload,this.onOpen(),"closed"!==this.readyState&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let e=0;e<this.writeBuffer.length;e++){const n=this.writeBuffer[e].data;if(n&&(t+=F(n)),e>0&&t>this.maxPayload)return this.writeBuffer.slice(0,e);t+=2}return this.writeBuffer}write(t,e,n){return this.sendPacket("message",t,e,n),this}send(t,e,n){return this.sendPacket("message",t,e,n),this}sendPacket(t,e,n,r){if("function"==typeof e&&(r=e,e=void 0),"function"==typeof n&&(r=n,n=null),"closing"===this.readyState||"closed"===this.readyState)return;(n=n||{}).compress=!1!==n.compress;const s={type:t,data:e,options:n};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),r&&this.once("flush",r),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),t()},n=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():t()}):this.upgrading?n():t()),this}onError(t){yt.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,e){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const e=[];let n=0;const r=t.length;for(;n<r;n++)~this.transports.indexOf(t[n])&&e.push(t[n]);return e}}yt.protocol=4;yt.protocol;const bt="function"==typeof ArrayBuffer,It=Object.prototype.toString,Ot="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===It.call(Blob),vt="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===It.call(File);function wt(t){return bt&&(t instanceof ArrayBuffer||(t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(t))||Ot&&t instanceof Blob||vt&&t instanceof File}function St(t,e){if(!t||"object"!=typeof t)return!1;if(Array.isArray(t)){for(let e=0,n=t.length;e<n;e++)if(St(t[e]))return!0;return!1}if(wt(t))return!0;if(t.toJSON&&"function"==typeof t.toJSON&&1===arguments.length)return St(t.toJSON(),!0);for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&St(t[e]))return!0;return!1}function kt(t){const e=[],n=t.data,r=t;return r.data=At(n,e),r.attachments=e.length,{packet:r,buffers:e}}function At(t,e){if(!t)return t;if(wt(t)){const n={_placeholder:!0,num:e.length};return e.push(t),n}if(Array.isArray(t)){const n=new Array(t.length);for(let r=0;r<t.length;r++)n[r]=At(t[r],e);return n}if("object"==typeof t&&!(t instanceof Date)){const n={};for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=At(t[r],e));return n}return t}function Tt(t,e){return t.data=_t(t.data,e),delete t.attachments,t}function _t(t,e){if(!t)return t;if(t&&!0===t._placeholder){if("number"==typeof t.num&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}if(Array.isArray(t))for(let n=0;n<t.length;n++)t[n]=_t(t[n],e);else if("object"==typeof t)for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=_t(t[n],e));return t}const Ct=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Pt=5;var Et;!function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"}(Et||(Et={}));class jt{constructor(t){this.replacer=t}encode(t){return t.type!==Et.EVENT&&t.type!==Et.ACK||!St(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===Et.EVENT?Et.BINARY_EVENT:Et.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let e=""+t.type;return t.type!==Et.BINARY_EVENT&&t.type!==Et.BINARY_ACK||(e+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(e+=t.nsp+","),null!=t.id&&(e+=t.id),null!=t.data&&(e+=JSON.stringify(t.data,this.replacer)),e}encodeAsBinary(t){const e=kt(t),n=this.encodeAsString(e.packet),r=e.buffers;return r.unshift(n),r}}function Dt(t){return"[object Object]"===Object.prototype.toString.call(t)}class xt extends q{constructor(t){super(),this.reviver=t}add(t){let e;if("string"==typeof t){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");e=this.decodeString(t);const n=e.type===Et.BINARY_EVENT;n||e.type===Et.BINARY_ACK?(e.type=n?Et.EVENT:Et.ACK,this.reconstructor=new Rt(e),0===e.attachments&&super.emitReserved("decoded",e)):super.emitReserved("decoded",e)}else{if(!wt(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");e=this.reconstructor.takeBinaryData(t),e&&(this.reconstructor=null,super.emitReserved("decoded",e))}}decodeString(t){let e=0;const n={type:Number(t.charAt(0))};if(void 0===Et[n.type])throw new Error("unknown packet type "+n.type);if(n.type===Et.BINARY_EVENT||n.type===Et.BINARY_ACK){const r=e+1;for(;"-"!==t.charAt(++e)&&e!=t.length;);const s=t.substring(r,e);if(s!=Number(s)||"-"!==t.charAt(e))throw new Error("Illegal attachments");n.attachments=Number(s)}if("/"===t.charAt(e+1)){const r=e+1;for(;++e;){if(","===t.charAt(e))break;if(e===t.length)break}n.nsp=t.substring(r,e)}else n.nsp="/";const r=t.charAt(e+1);if(""!==r&&Number(r)==r){const r=e+1;for(;++e;){const n=t.charAt(e);if(null==n||Number(n)!=n){--e;break}if(e===t.length)break}n.id=Number(t.substring(r,e+1))}if(t.charAt(++e)){const r=this.tryParse(t.substr(e));if(!xt.isPayloadValid(n.type,r))throw new Error("invalid payload");n.data=r}return n}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(t){return!1}}static isPayloadValid(t,e){switch(t){case Et.CONNECT:return Dt(e);case Et.DISCONNECT:return void 0===e;case Et.CONNECT_ERROR:return"string"==typeof e||Dt(e);case Et.EVENT:case Et.BINARY_EVENT:return Array.isArray(e)&&("number"==typeof e[0]||"string"==typeof e[0]&&-1===Ct.indexOf(e[0]));case Et.ACK:case Et.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Rt{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const t=Tt(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function Nt(t,e,n){return t.on(e,n),function(){t.off(e,n)}}const Vt=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Mt extends q{constructor(t,e,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=e,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Nt(t,"open",this.onopen.bind(this)),Nt(t,"packet",this.onpacket.bind(this)),Nt(t,"error",this.onerror.bind(this)),Nt(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...e){if(Vt.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(e.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(e),this;const n={type:Et.EVENT,data:e,options:{}};if(n.options.compress=!1!==this.flags.compress,"function"==typeof e[e.length-1]){const t=this.ids++,r=e.pop();this._registerAckCallback(t,r),n.id=t}const r=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!r||!this.connected)||(this.connected?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n)),this.flags={},this}_registerAckCallback(t,e){var n;const r=null!==(n=this.flags.timeout)&&void 0!==n?n:this._opts.ackTimeout;if(void 0===r)return void(this.acks[t]=e);const s=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let e=0;e<this.sendBuffer.length;e++)this.sendBuffer[e].id===t&&this.sendBuffer.splice(e,1);e.call(this,new Error("operation has timed out"))},r);this.acks[t]=(...t)=>{this.io.clearTimeoutFn(s),e.apply(this,[null,...t])}}emitWithAck(t,...e){const n=void 0!==this.flags.timeout||void 0!==this._opts.ackTimeout;return new Promise((r,s)=>{e.push((t,e)=>n?t?s(t):r(e):r(t)),this.emit(t,...e)})}_addToQueue(t){let e;"function"==typeof t[t.length-1]&&(e=t.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((t,...r)=>{if(n!==this._queue[0])return;return null!==t?n.tryCount>this._opts.retries&&(this._queue.shift(),e&&e(t)):(this._queue.shift(),e&&e(null,...r)),n.pending=!1,this._drainQueue()}),this._queue.push(n),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||0===this._queue.length)return;const e=this._queue[0];e.pending&&!t||(e.pending=!0,e.tryCount++,this.flags=e.flags,this.emit.apply(this,e.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){"function"==typeof this.auth?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Et.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,e){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,e)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Et.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Et.EVENT:case Et.BINARY_EVENT:this.onevent(t);break;case Et.ACK:case Et.BINARY_ACK:this.onack(t);break;case Et.DISCONNECT:this.ondisconnect();break;case Et.CONNECT_ERROR:this.destroy();const e=new Error(t.data.message);e.data=t.data.data,this.emitReserved("connect_error",e)}}onevent(t){const e=t.data||[];null!=t.id&&e.push(this.ack(t.id)),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const e=this._anyListeners.slice();for(const n of e)n.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&"string"==typeof t[t.length-1]&&(this._lastOffset=t[t.length-1])}ack(t){const e=this;let n=!1;return function(...r){n||(n=!0,e.packet({type:Et.ACK,id:t,data:r}))}}onack(t){const e=this.acks[t.id];"function"==typeof e&&(e.apply(this,t.data),delete this.acks[t.id])}onconnect(t,e){this.id=t,this.recovered=e&&this._pid===e,this._pid=e,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Et.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const e=this._anyListeners;for(let n=0;n<e.length;n++)if(t===e[n])return e.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const e=this._anyOutgoingListeners;for(let n=0;n<e.length;n++)if(t===e[n])return e.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const e=this._anyOutgoingListeners.slice();for(const n of e)n.apply(this,t.data)}}}function Bt(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}Bt.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=1&Math.floor(10*e)?t+n:t-n}return 0|Math.min(t,this.max)},Bt.prototype.reset=function(){this.attempts=0},Bt.prototype.setMin=function(t){this.ms=t},Bt.prototype.setMax=function(t){this.max=t},Bt.prototype.setJitter=function(t){this.jitter=t};class Jt extends q{constructor(e,n){var r;super(),this.nsps={},this.subs=[],e&&"object"==typeof e&&(n=e,e=void 0),(n=n||{}).path=n.path||"/socket.io",this.opts=n,z(this,n),this.reconnection(!1!==n.reconnection),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(r=n.randomizationFactor)&&void 0!==r?r:.5),this.backoff=new Bt({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==n.timeout?2e4:n.timeout),this._readyState="closed",this.uri=e;const s=n.parser||t;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=!1!==n.autoConnect,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return void 0===t?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var e;return void 0===t?this._reconnectionDelay:(this._reconnectionDelay=t,null===(e=this.backoff)||void 0===e||e.setMin(t),this)}randomizationFactor(t){var e;return void 0===t?this._randomizationFactor:(this._randomizationFactor=t,null===(e=this.backoff)||void 0===e||e.setJitter(t),this)}reconnectionDelayMax(t){var e;return void 0===t?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,null===(e=this.backoff)||void 0===e||e.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new yt(this.uri,this.opts);const e=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const r=Nt(e,"open",function(){n.onopen(),t&&t()}),s=e=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",e),t?t(e):this.maybeReconnectOnOpen()},o=Nt(e,"error",s);if(!1!==this._timeout){const t=this._timeout,n=this.setTimeoutFn(()=>{r(),s(new Error("timeout")),e.close()},t);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}return this.subs.push(r),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Nt(t,"ping",this.onping.bind(this)),Nt(t,"data",this.ondata.bind(this)),Nt(t,"error",this.onerror.bind(this)),Nt(t,"close",this.onclose.bind(this)),Nt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error",t)}}ondecoded(t){dt(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,e){let n=this.nsps[t];return n?this._autoConnect&&!n.active&&n.connect():(n=new Mt(this,t,e),this.nsps[t]=n),n}_destroy(t){const e=Object.keys(this.nsps);for(const t of e){if(this.nsps[t].active)return}this._close()}_packet(t){const e=this.encoder.encode(t);for(let n=0;n<e.length;n++)this.engine.write(e[n],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,e){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,e),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const e=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),t.skipReconnect||t.open(e=>{e?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",e)):t.onreconnect()}))},e);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Ut={};function qt(t,e){"object"==typeof t&&(e=t,t=void 0);const n=function(t,e="",n){let r=t;n=n||"undefined"!=typeof location&&location,null==t&&(t=n.protocol+"//"+n.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?n.protocol+t:n.host+t),/^(https?|wss?):\/\//.test(t)||(t=void 0!==n?n.protocol+"//"+t:"https://"+t),r=gt(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const s=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+s+":"+r.port+e,r.href=r.protocol+"://"+s+(n&&n.port===r.port?"":":"+r.port),r}(t,(e=e||{}).path||"/socket.io"),r=n.source,s=n.id,o=n.path,i=Ut[s]&&o in Ut[s].nsps;let a;return e.forceNew||e["force new connection"]||!1===e.multiplex||i?a=new Jt(r,e):(Ut[s]||(Ut[s]=new Jt(r,e)),a=Ut[s]),n.query&&!e.query&&(e.query=n.queryKey),a.socket(n.path,e)}Object.assign(qt,{Manager:Jt,Socket:Mt,io:qt,connect:qt});var Lt=__webpack_require__(337);class Gt extends i{type;socketId;data;static DESCRIPTOR_NAME="ChannelMessage";static DESCRIPTOR={fields:{type:{type:"uint32",id:1},socketId:{type:"string",id:2},data:{type:"bytes",id:3}}};constructor(t,e,n){super(),this.type=t,this.socketId=e,this.data=n}toJSON(){return{type:this.type,socketId:this.socketId,data:this.data}}static fromJSON(t){return new Gt(t.type,t.socketId,t.data)}}const Yt=class extends((0,n.EmitterMixin)()){_channelName;_wsGateway;_socket;constructor(t,e,n){super(),this._channelName=t,this._wsGateway=e,this._socket=n,this._subscribeToChannel()}remove(){this._socket.off(this._channelName)}getEventName(t,e=!1){let n="";return e&&(n+="all:"),n+="event",t&&(n+=":"+t),n}_subscribeToChannel(){this._socket.on(this._channelName,t=>{const e=p.decode(t,Gt);this.fire(this.getEventName(e.type,!0),e.data,e.socketId),e.socketId!==this._wsGateway.socketId&&this.fire(this.getEventName(e.type),e.data,e.socketId)})}};class Ht extends Error{context;code;data;constructor(t,e,n=null,r={}){super("cloud-services-internal-error: "+t),this.context=e,this.code=n,this.data=r,this.name="CKEditorError"}static fromPublicError(t){return new Ht(function(t){let e="cloud-services-error: "+t.message;return t.data&&(e+="\nError data: "+JSON.stringify(t.data)),t.explanation&&(e+="\nExplanation: "+t.explanation),t.action&&(e+="\nAction: "+t.action),t.traceId&&(e+="\nTraceId: "+t.traceId),t.code&&(e+="\nCode: "+t.code),e}(t),t)}}class zt extends Error{code;traceId;data;constructor(t,e){super(),this.name="CKEditorCloudServicesServerError",this.stack=void 0,this.message=t,this.code=e.code,this.traceId=e.traceId,this.data=e.data}static fromPublicError(t){return new zt(function(t){let e="cloud-services-server-error: "+t.message;return t.explanation&&(e+="\nExplanation: "+t.explanation),t.action&&(e+="\nAction: "+t.action),t.traceId&&(e+="\nTraceId: "+t.traceId),t.code&&(e+="\nCode: "+t.code),e}(t),t)}}class Ft extends i{flags;rooms;except;static TYPE=11;static DESCRIPTOR_NAME="PacketOptionsMessage";static DESCRIPTOR={fields:{flags:{type:"string",id:1},rooms:{type:"string",id:2,rule:"repeated"},except:{type:"string",id:3,rule:"repeated"}}};constructor(t,e=[],n=[]){super(),this.flags=t,this.rooms=e,this.except=n}toJSON(){return{flags:this.flags?JSON.stringify(this.flags):void 0,rooms:this.rooms?.length?this.rooms:void 0,except:this.except?.length?this.except:void 0}}static fromJSON(t){return new Ft(t.flags&&JSON.parse(t.flags),t.rooms,t.except)}}const Kt=(()=>!("undefined"==typeof process||!process.versions?.node))(),Wt=1,Qt=2,Xt=3,Zt=4;class $t{static getPacketType(...t){let e=0;for(let n=0;n<t.length;n++)e+=t[n]*Math.pow(10,t.length-n-1);return e}static getType(t){if($t.isBuffer(t))return Wt;const e=typeof t;return"string"===e?Qt:"number"===e?Xt:Zt}static isBuffer(t){return Kt&&Buffer.isBuffer(t)||t instanceof ArrayBuffer||t instanceof Uint8Array||this._isBufferView(t)}static _isBufferView(t){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer}}class te extends i{data;data1;static create(t,e){throw new TypeError("Must be implemented in a child class!")}}class ee extends te{data;data1;static TYPE=(()=>$t.getPacketType(Xt,Wt))();static DESCRIPTOR_NAME="NumberBytesPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"uint32",id:1},data1:{type:"bytes",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new ee(t.data,t.data1)}static create(t,e){return new ee(t,e)}}class ne extends te{data;data1;static TYPE=(()=>$t.getPacketType(Qt,Wt))();static DESCRIPTOR_NAME="StringBytesPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"bytes",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new ne(t.data,t.data1)}static create(t,e){return new ne(t,e)}}class re extends te{data;data1;static TYPE=(()=>$t.getPacketType(Wt,Wt))();static DESCRIPTOR_NAME="BytesBytesPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"bytes",id:1},data1:{type:"bytes",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new re(t.data,t.data1)}static create(t,e){return new re(t,e)}}class se extends te{data;data1;static TYPE=(()=>$t.getPacketType(Qt,Zt))();static DESCRIPTOR_NAME="StringObjectPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"string",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1?JSON.stringify(this.data1):void 0}}static fromJSON(t){return new se(t.data,t.data1&&JSON.parse(t.data1))}static create(t,e){return new se(t,e)}}class oe extends te{data;data1;static TYPE=(()=>$t.getPacketType(Xt,Zt))();static DESCRIPTOR_NAME="NumberObjectPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"uint32",id:1},data1:{type:"string",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1?JSON.stringify(this.data1):void 0}}static fromJSON(t){return new oe(t.data,t.data1&&JSON.parse(t.data1))}static create(t,e){return new oe(t,e)}}class ie extends te{data;data1;static TYPE=(()=>$t.getPacketType(Zt,Zt))();static DESCRIPTOR_NAME="ObjectObjectPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"string",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data?JSON.stringify(this.data):void 0,data1:this.data1?JSON.stringify(this.data1):void 0}}static fromJSON(t){return new ie(t.data&&JSON.parse(t.data),t.data1&&JSON.parse(t.data1))}static create(t,e){return new ie(t,e)}}class ae extends te{data;data1;static TYPE=(()=>$t.getPacketType(Zt,Wt))();static DESCRIPTOR_NAME="ObjectBufferPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"bytes",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data?JSON.stringify(this.data):void 0,data1:this.data1}}static fromJSON(t){return new ae(t.data&&JSON.parse(t.data),t.data1)}static create(t,e){return new ae(t,e)}}class ce extends te{data;data1;static TYPE=(()=>$t.getPacketType(Qt,Qt))();static DESCRIPTOR_NAME="StringStringPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"string",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new ce(t.data,t.data1)}static create(t,e){return new ce(t,e)}}class ue extends te{data;data1;static TYPE=(()=>$t.getPacketType(Qt,Xt))();static DESCRIPTOR_NAME="StringNumberPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"uint32",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new ue(t.data,t.data1)}static create(t,e){return new ue(t,e)}}class de extends te{data;data1;static TYPE=(()=>$t.getPacketType(Xt,Xt))();static DESCRIPTOR_NAME="NumberNumberPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"uint32",id:1},data1:{type:"uint32",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new de(t.data,t.data1)}static create(t,e){return new de(t,e)}}class le extends te{data;data1;static TYPE=(()=>$t.getPacketType(Xt,Qt))();static DESCRIPTOR_NAME="NumberStringPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"uint32",id:1},data1:{type:"string",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new le(t.data,t.data1)}static create(t,e){return new le(t,e)}}const pe=(()=>[ee,ne,re,se,oe,ie,ae,ce,ue,de,le].reduce((t,e)=>(t[e.TYPE]=e,t),{}))();class he extends i{type;data;id;nsp;options;static TYPE=10;static DESCRIPTOR_NAME="PacketMessage";static DESCRIPTOR={fields:{type:{type:"uint32",id:1},id:{type:"uint32",id:2},nsp:{type:"string",id:3},data:{type:"bytes",id:4},options:{type:"bytes",id:5}}};constructor(t,e,n,r="/",s){super(),this.type=t,this.data=e,this.id=n,this.nsp=r,this.options=s??new Ft}get packetData(){return void 0===this.data.data&&void 0===this.data.data1?[]:this.data.data&&void 0===this.data.data1?[this.data.data]:[this.data.data,this.data.data1]}toJSON(){const t=p.encode(this.options),e=p.encode(this.data);return{type:this.type+10*this.data.constructor.TYPE,id:this.id,nsp:"/"===this.nsp?void 0:this.nsp,data:e,options:t}}static fromJSON(t){const e=Math.floor(t.type/10);return new he(t.type-10*e,p.decode(t.data,pe[e]),t.id,t.nsp,t.options?p.decode(t.options,Ft):new Ft)}static create(t,e={}){const n=$t.getPacketType($t.getType(t.data[0]),$t.getType(t.data[1]??t.data[0]));return new he(t.type,pe[n].create(t.data[0],t.data[1]),t.id,t.nsp,new Ft(e.flags,e.rooms,e.except))}}class fe{encode(t,e,n,r="/",s={}){if(e.length>2)throw new Error("PacketParser supports only 2 elements in data");const o={type:t,data:e,id:n,nsp:r};return p.encode(he.create(o,s))}decode(t){const e=p.decode(t,he);return{packet:{id:e.id,type:e.type,data:e.packetData,nsp:e.nsp},options:{flags:e.options.flags,rooms:e.options.rooms,except:e.options.except}}}}const me=(()=>[Et.EVENT,Et.ACK,Et.BINARY_ACK,Et.BINARY_EVENT])();class ge extends jt{_packetParser;constructor(t){super(),this._packetParser=t??new fe}encode(t){if(me.includes(t.type))try{return[this._packetParser.encode(t.type,t.data,t.id,t.nsp)]}catch(t){console.error("Can not properly serialize or deserialize messages. Check the original error.",{originalError:{message:t.message}})}return super.encode(t)}}class ye extends xt{_packetParser;constructor(t){super(),this._packetParser=t??new fe}add(t){if(!$t.isBuffer(t))return super.add(t);let e;try{e=this._packetParser.decode(t).packet}catch(e){return super.add(t)}super.emitReserved("decoded",e)}}class be{_context;_deferredPromise=function(){let t,e;const n=new Promise((n,r)=>{t=n,e=r});return{resolve:t,reject:e,promise:n}}();timeout;constructor(t,e){this._context=t,this.timeout=setTimeout(()=>this.error(new Ht("Request timeout.",this._context)),e)}get promise(){return this._deferredPromise.promise}response(t){this._deferredPromise.resolve(t)}error(t){this._deferredPromise.reject(t)}}class Ie{_context;_requests=new Set;constructor(t){this._context=t}async send(t,e=45e3){const n=this._createRequest(e);try{return t(n),await n.promise}finally{this._finishRequest(n)}}errorAll(t){for(const e of this._requests)e.error(t)}waitForAllRequests(t=45e3){return this._waitForRequests(t)}_createRequest(t){const e=new be(this._context,t);return this._requests.add(e),e}_finishRequest(t){this._requests.delete(t),clearTimeout(t.timeout)}async _waitForRequests(t=5e3,e=0){return!this._requests.size||e>=t/500?Promise.resolve():(await new Promise(t=>{setTimeout(t,500)}),this._waitForRequests(t,e++))}}const Oe={DISCONNECTED:"disconnected",CONNECTING:"connecting",CONNECTED:"connected"};class ve extends((0,n.ObservableMixin)()){_requestsManager;_url;_socket;_socketAuth;_channels;_connectionAttempt=0;_token;_options;_connectionProvider;_userFactory;static STATE_DISCONNECTED=(()=>Oe.DISCONNECTED)();static STATE_CONNECTING=(()=>Oe.CONNECTING)();static STATE_CONNECTED=(()=>Oe.CONNECTED)();static _CHANGE_STATE_EVENT_PRIORITY=(()=>n.priorities.get("highest")+999999)();constructor(t,e,n,r,s){if(super(),this._token=e,this._options=n??{},this._connectionProvider=r??qt,this._userFactory=s??I.get,this._requestsManager=new Ie(this),this._channels=new Map,!t)throw new TypeError("Api address must be provided.");if(!this._token)throw new TypeError("Token must be provided.");this._options.requestTimeout||(this._options.requestTimeout=2e4),this._url=Lt(t.replace(/^(?!(?:\w+:)?\/\/)/,"https://")),this.set("state",Oe.DISCONNECTED),this.set("socketId",void 0),this.set("me",void 0),this.on("change:state",async(t,e,n)=>{if(this._debugEvent("ws-gw:change:state",n),n!==ve.STATE_CONNECTED){if(n===ve.STATE_DISCONNECTED)return this._requestsManager.errorAll(new Ht("Not connected.",this))}else try{this.me=await this._userFactory.call(I,this,this._socketAuth?.userId)}catch(t){}},{priority:ve._CHANGE_STATE_EVENT_PRIORITY}),this.on("error",(t,e)=>{this._options.onError?this._options.onError(e):console.error(e)})}get sessionId(){return this.socketId}waitForAllRequests(t){return this._requestsManager.waitForAllRequests(t)}disconnect(){this.state!==Oe.DISCONNECTED&&(this._socket?.disconnect(),this._socket=void 0,this.state=Oe.DISCONNECTED)}async reconnect(){this._socket||this.state!==Oe.DISCONNECTED||(await this._token.refreshToken(),await this._connect())}static async connect(t,e="local.cs.dev:443/ws-v2",n={},r=qt,s=I.get){const o=new ve(e,t,n,r,s);return await o._connect(),o}_sendRequest(t,e,n){if(!t)throw new Ht("`serviceName` must be provided.",this);if(this.state!==ve.STATE_CONNECTED)throw new Ht("Not connected.",this);if(!this._socketAuth||!this._socketAuth.isAuthenticated)throw new Ht("Not authenticated.",this);const r=new ArrayBuffer(n.length+2),s=new Uint8Array(r);return s[0]=t,s[1]=parseInt(e),s.set(n,2),this._emit(1,s)}_getChannel(t,e){const n=""+t+e;return!this._channels.has(n)&&this._socket&&this._channels.set(n,new Yt(n,this,this._socket)),this._channels.get(n)}_connect(){return new Promise((t,e)=>{const n=this._setupSocket();!this.socketId&&n.io.on("reconnect_error",()=>{this._debugEvent("reconnect_error"),this._reconnectionAttemptError(e)}),n.once("connect",async()=>{this._debugEvent("once-connect");try{await this._onConnect(),t()}catch(t){e(t)}}),n.connect()})}_getPortByProtocol(t){return["http:","ws:"].includes(t)?80:443}_setupSocket(){if(this._socket)return this._socket;const t=this._url.port||this._getPortByProtocol(this._url.protocol),e=(this._url.protocol||"https:")+"//"+this._url.hostname+":"+t,n=this._url.pathname.match(/^\/.*\/ws/)?this._url.pathname.split("/ws")[0]:"",r=this._connectionProvider(e,{parser:{Encoder:ge,Decoder:ye},path:n+"/ws-v2/ws",transports:["websocket"],timeout:void 0!==this._options.timeout?this._options.timeout:5e3,reconnection:void 0===this._options.autoReconnect||this._options.autoReconnect,reconnectionDelay:1e3,reconnectionDelayMax:5e3,rejectUnauthorized:void 0===this._options.rejectUnauthorized||this._options.rejectUnauthorized,query:{version:"53.0.1"},agent:this._options.agent??!1,closeOnBeforeunload:!1});return this.state=Oe.CONNECTING,r.on("connect",()=>{this._debugEvent("connect"),this.socketId=r.id}),r.on("connect_error",t=>{this._debugEvent("connect_error",t)}),r.on("disconnect",()=>{this._debugEvent("disconnect"),this._onDisconnect()}),r.io.on("reconnect",async()=>{this._debugEvent("reconnect"),await this._onReconnect()}),r.io.on("reconnect_attempt",t=>{this._debugEvent("reconnect_attempt",t),this.state=Oe.CONNECTING,this._connectionAttempt=t}),r.on("unauthorized",t=>{this._debugEvent("unauthorized"),this._onUnauthorized(t)}),r.on("authenticationRequest",async t=>{this._debugEvent("authenticationRequest",t.attempt),await this._onReconnect()}),this._socket=r,r}_emit(t,e){const n=this._socket;return this._requestsManager.send(r=>{n.emit(t,e,(t,e)=>{if(t)return r.error(zt.fromPublicError(t));r.response(e)})},this._options.requestTimeout)}_addAuthData(t,e){this._socketAuth={environmentId:t,userId:e,isAuthenticated:!0}}_removeAuthData(){this._socketAuth=void 0}async _onConnect(){await this._authenticate(this._token.value),this.state=Oe.CONNECTED;const t=async(t,e,n)=>{this._debugEvent("token:value:change");try{await this._authenticate(n)}catch(t){}};this._token.on("change:value",t),this._socket.io.off("reconnect_error"),this.on("disconnect",()=>{this._token.off("change:value",t)})}async _onReconnect(){await this._token.refreshToken(),await this._onConnect()}_onDisconnect(){this.state=Oe.DISCONNECTED,this._connectionAttempt=0,this.fire("disconnect");for(const t of this._channels.values())t.remove();this._channels.clear(),void 0===this._options.autoReconnect||this._options.autoReconnect||(this._socket=void 0)}_debugEvent(t,e){if(!this._isDebugModeEnabled())return;const n=void 0!==e?", data: "+e:"";console.info((new Date).toLocaleString()+" "+t+n)}_reconnectionAttemptError(t){this._connectionAttempt>=2&&(this.disconnect(),t(Ht.fromPublicError({message:"The number of initial connection attempts exceeded.",explanation:"Three initial connection attempts failed. It can be caused by a slow, unstable, missing or blocked Internet connection.",action:"Please verify the stability of your Internet connection and ensure that no antivirus or firewall software blocks the Web Socket protocol connections."})))}_onUnauthorized({error:t}){this._removeAuthData(),this.fire("error",zt.fromPublicError(t))}async _authenticate(t){try{this._debugEvent("authenticate:start");const e=await this._emit(2,{token:t});this._debugEvent("authenticate:success","envId: "+e.environmentId+", userId: "+e.userId),this._addAuthData(e.environmentId,e.userId)}catch(t){throw this._debugEvent("authenticate:error",t.message),this._removeAuthData(),t}}_isDebugModeEnabled(){return!!n.global.window.localStorage&&"true"===(n.global.window.localStorage.getItem("csClientDebugMode")??"false").toLowerCase()}}const we=ve;class Se extends i{bundleVersion;static TYPE="131";static READABLE_TYPE_NAME="isEditorBundleUploaded";static DESCRIPTOR_NAME="IsEditorBundleUploadedMessage";static DESCRIPTOR={fields:{bundleVersion:{type:"string",id:1}}};constructor(t){super(),this.bundleVersion=t}toJSON(){return{bundleVersion:this.bundleVersion}}static fromJSON(t){return new Se(t.bundleVersion)}}class ke extends i{isUploaded;static DESCRIPTOR_NAME="IsEditorBundleUploadedResponse";static DESCRIPTOR={fields:{isUploaded:{type:"bool",id:1}}};constructor(t){super(),this.isUploaded=t}toJSON(){return{isUploaded:this.isUploaded}}static fromJSON(t){return new ke(t.isUploaded)}}class Ae extends((0,n.EmitterMixin)()){static _SERVICE=13;static async isBundleUploaded(t,e){const n=new Se(e);if(t.state!==Oe.CONNECTED)throw new Ht("WebSocket Gateway is not connected.",t);const r=await t._sendRequest(Ae._SERVICE,Se.TYPE,p.encode(n));return p.decode(r,ke).isUploaded}}const Te=Ae;class _e extends i{documentId;revisionId;static TYPE="123";static READABLE_TYPE_NAME="getRevision";static DESCRIPTOR_NAME="RevisionHistoryGetRevisionMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1},revisionId:{type:"string",id:2}}};constructor(t,e){super(),this.documentId=t,this.revisionId=e}toJSON(){return{documentId:this.documentId,revisionId:this.revisionId}}static fromJSON(t){return new _e(t.documentId,t.revisionId)}}class Ce extends o{static DESCRIPTOR_NAME="RevisionDescriptor";static DESCRIPTOR={fields:{revisionId:{type:"string",id:1},name:{type:"string",id:2},creatorId:{type:"string",id:3},authorsIds:{type:"string",id:4},diffData:{type:"string",id:5},createdAt:{type:"string",id:6},attributes:{type:"string",id:7},toVersion:{type:"uint32",id:8},fromVersion:{type:"uint32",id:9},isEmptyCurrent:{type:"bool",id:10}}};static create(t){return{revisionId:t.id,name:t.name,creatorId:t.creatorId,createdAt:t.createdAt,fromVersion:t.fromVersion,toVersion:t.toVersion,isEmptyCurrent:t.isEmptyCurrent,diffData:t.diffData?JSON.stringify(t.diffData):void 0,attributes:t.attributes,authorsIds:t.authorsIds}}static toJSON(t){return{revisionId:t.revisionId,name:t.name,creatorId:t.creatorId,authorsIds:t.authorsIds?JSON.stringify(t.authorsIds):void 0,diffData:t.diffData,createdAt:t.createdAt?.toISOString(),attributes:t.attributes?JSON.stringify(t.attributes):void 0,toVersion:t.toVersion,fromVersion:t.fromVersion,isEmptyCurrent:t.isEmptyCurrent}}static fromJSON(t){return{revisionId:(t={...t}).revisionId,name:t.name,creatorId:t.creatorId,authorsIds:t.authorsIds?JSON.parse(t.authorsIds):void 0,diffData:t.diffData,createdAt:t.createdAt?new Date(t.createdAt):void 0,attributes:t.attributes?JSON.parse(t.attributes):void 0,toVersion:t.toVersion,fromVersion:t.fromVersion,isEmptyCurrent:t.isEmptyCurrent}}static toObject(t){return function(t){for(const[e,n]of Object.entries(t))void 0===n&&delete t[e];return t}({id:t.revisionId,name:t.name,creatorId:t.creatorId,createdAt:t.createdAt,fromVersion:t.fromVersion,toVersion:t.toVersion,isEmptyCurrent:t.isEmptyCurrent,diffData:t.diffData?JSON.parse(t.diffData):void 0,attributes:t.attributes,authorsIds:t.authorsIds})}}class Pe extends i{revisionId;name;creatorId;authorsIds;createdAt;diffData;attributes;fromVersion;toVersion;isEmptyCurrent;static DESCRIPTOR_NAME="RevisionHistoryGetRevisionResponse";static DESCRIPTOR=(()=>Ce.DESCRIPTOR)();constructor(t,e,n,r,s,o,i,a,c,u){super(),this.revisionId=t,this.name=e,this.creatorId=n,this.authorsIds=r,this.createdAt=s,this.diffData=o,this.attributes=i,this.fromVersion=a,this.toVersion=c,this.isEmptyCurrent=u}toJSON(){return Ce.toJSON(this)}toObject(){return Ce.toObject(this)}static create(t){return new Pe(t.revisionId,t.name,t.creatorId,t.authorsIds,t.createdAt,t.diffData,t.attributes,t.fromVersion,t.toVersion,t.isEmptyCurrent)}static fromJSON(t){return new Pe(t.revisionId,t.name,t.creatorId,t.authorsIds?JSON.parse(t.authorsIds):void 0,t.createdAt?new Date(t.createdAt):void 0,t.diffData,t.attributes?JSON.parse(t.attributes):void 0,t.fromVersion,t.toVersion,t.isEmptyCurrent)}}class Ee extends i{documentId;requestId;revisions;static TYPE="124";static READABLE_TYPE_NAME="updateRevisions";static DESCRIPTOR_NAME="RevisionHistoryUpdateRevisionsMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1},requestId:{type:"uint32",id:2},revisions:{type:"RevisionDescriptor",id:3,rule:"repeated"}}};constructor(t,e,n){super(),this.documentId=t,this.requestId=e,this.revisions=n}toJSON(){return{documentId:this.documentId,requestId:this.requestId,revisions:this.revisions.map(Ce.toJSON)}}toObject(){return{documentId:this.documentId,requestId:this.requestId,revisions:this.revisions.map(Ce.toObject)}}static create(t){return new Ee(t.documentId,t.requestId,t.revisions.map(Ce.create))}static fromJSON(t){return new Ee(t.documentId,t.requestId,t.revisions.map(Ce.fromJSON))}}class je extends i{requestId;static DESCRIPTOR_NAME="RevisionHistoryUpdateRevisionsResponse";static DESCRIPTOR={fields:{requestId:{type:"uint32",id:1}}};constructor(t){super(),this.requestId=t}toJSON(){return{requestId:this.requestId}}static fromJSON(t){return new je(t.requestId)}}class De extends i{documentId;static TYPE="121";static READABLE_TYPE_NAME="connectToRevisionHistory";static DESCRIPTOR_NAME="RevisionHistoryConnectMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1}}};constructor(t){super(),this.documentId=t}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new De(t.documentId)}}class xe extends i{channel;requestId;revisions;static DESCRIPTOR_NAME="RevisionHistoryConnectResponse";static DESCRIPTOR={fields:{channel:{type:"string",id:1},requestId:{type:"uint32",id:2},revisions:{type:"RevisionDescriptor",id:3,rule:"repeated"}}};constructor(t,e,n){super(),this.channel=t,this.requestId=e,this.revisions=n}toJSON(){return{channel:this.channel,requestId:this.requestId,revisions:this.revisions.map(Ce.toJSON)}}toObject(){return{channel:this.channel,requestId:this.requestId,revisions:this.revisions.map(Ce.toObject)}}static fromJSON(t){return new xe(t.channel,t.requestId,t.revisions.map(Ce.fromJSON))}}class Re extends i{documentId;requestId;static TYPE="122";static READABLE_TYPE_NAME="reconnectToRevisionHistory";static DESCRIPTOR_NAME="RevisionHistoryReconnectMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1},requestId:{type:"uint32",id:2}}};constructor(t,e){super(),this.documentId=t,this.requestId=e}toJSON(){return{documentId:this.documentId,requestId:this.requestId}}static fromJSON(t){return new Re(t.documentId,t.requestId)}}class Ne extends Ht{constructor(t,e){super(t+" Service is not connected.",e)}}class Ve extends((0,n.EmitterMixin)()){_documentId;_isConnected=!1;_wsGateway;_channel;static _SERVICE=12;constructor(t){super(),this._documentId=t}get isConnected(){return this._isConnected}connect(t){return this._isConnected?Promise.resolve():this._connect(t,new De(this._documentId))}disconnect(){this._isConnected&&(this._isConnected=!1,this._wsGateway&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this._channel&&(this.stopListening(this._channel),this._channel=void 0),this.fire("disconnected"),this.stopListening())}reconnect(t,e){if(this.isConnected)throw new Ht("Cannot reconnect to already connected service.",t);return this._connect(t,new Re(this._documentId,e))}async updateRevisions(t,e){const n=Ee.create({documentId:this._documentId,requestId:e,revisions:t}),r=await this._sendRequest(Ee.TYPE,n),{requestId:s}=p.decode(r,je);return s}async getRevision(t){const e=new _e(this._documentId,t),n=await this._sendRequest(_e.TYPE,e);return p.decode(n,Pe).toObject()}async _connect(t,e){if(t.state!==Oe.CONNECTED)throw new Ht("WebSocket Gateway is not connected.",t);this._wsGateway=t,this.stopListening(t,"change:state");const n=await t._sendRequest(12,e.constructor.TYPE,p.encode(e)),{channel:r,requestId:s,revisions:o}=p.decode(n,xe).toObject();return this.listenTo(t,"change:state",(t,e,n)=>this._onWsGatewayStateChange(n),{priority:we._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(t,r),this._isConnected=!0,this.fire("connected"),{revisions:o,requestId:s}}_connectToChannel(t,e){this._channel=t._getChannel(Ve._SERVICE,e),this._channel&&this.listenTo(this._channel,this._channel.getEventName(Ee.TYPE),(t,e)=>{const{documentId:n,requestId:r,revisions:s}=p.decode(e,Ee).toObject();this.fire("revisionsUpdated",{documentId:n,requestId:r,revisionsData:s})})}_onWsGatewayStateChange(t){t===Oe.DISCONNECTED&&this.disconnect()}_sendRequest(t,e){if(!this._wsGateway||!this._isConnected)throw new Ne("Revision History",this);return this._wsGateway._sendRequest(12,t,p.encode(e))}}const Me=Ve;class Be extends i{id;documentId;type;data;originalSuggestionId;attributes;static TYPE="101";static READABLE_TYPE_NAME="addSuggestion";static DESCRIPTOR_NAME="TrackChangesAddSuggestionMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},documentId:{type:"string",id:2},type:{type:"string",id:3},data:{type:"string",id:4},originalSuggestionId:{type:"string",id:5},attributes:{type:"string",id:6}}};constructor(t,e,n,r={},s=null,o=null){super(),this.id=t,this.documentId=e,this.type=n,this.data=r,this.originalSuggestionId=s,this.attributes=o}toJSON(){return{id:this.id,documentId:this.documentId,type:this.type,data:JSON.stringify(this.data),originalSuggestionId:this.originalSuggestionId,attributes:JSON.stringify(this.attributes)}}static fromJSON(t){return new Be(t.id,t.documentId,t.type,JSON.parse(t.data),t.originalSuggestionId??null,t.attributes?JSON.parse(t.attributes):null)}}class Je extends i{id;authorId;type;hasComments;state;data;attributes;createdAt;static DESCRIPTOR_NAME="TrackChangesAddSuggestionResponse";static DESCRIPTOR={fields:{id:{type:"string",id:1},authorId:{type:"string",id:2},type:{type:"string",id:3},createdAt:{type:"string",id:4},data:{type:"string",id:5},hasComments:{type:"bool",id:6},state:{type:"string",id:7},attributes:{type:"string",id:8}}};constructor(t,e,n,r,s,o,i={},a=null){super(),this.id=t,this.authorId=e,this.type=n,this.hasComments=s,this.state=o,this.data=i,this.attributes=a,this.createdAt=r?new Date(r):void 0}toJSON(){return{id:this.id,authorId:this.authorId,type:this.type,createdAt:this.createdAt?.toISOString(),data:JSON.stringify(this.data),hasComments:this.hasComments,state:this.state,attributes:JSON.stringify(this.attributes)}}static fromJSON(t){return new Je(t.id,t.authorId,t.type,t.createdAt,t.hasComments,t.state,JSON.parse(t.data),t.attributes?JSON.parse(t.attributes):null)}}class Ue extends i{id;documentId;static TYPE="103";static READABLE_TYPE_NAME="getSuggestion";static DESCRIPTOR_NAME="TrackChangesGetSuggestionMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},documentId:{type:"string",id:2}}};constructor(t,e){super(),this.id=t,this.documentId=e}toJSON(){return{id:this.id,documentId:this.documentId}}static fromJSON(t){return new Ue(t.id,t.documentId)}}class qe extends i{id;authorId;type;hasComments;state;data;attributes;createdAt;static DESCRIPTOR_NAME="TrackChangesGetSuggestionResponse";static DESCRIPTOR={fields:{id:{type:"string",id:1},authorId:{type:"string",id:2},type:{type:"string",id:3},createdAt:{type:"string",id:4},data:{type:"string",id:5},hasComments:{type:"bool",id:6},state:{type:"string",id:7},attributes:{type:"string",id:8}}};constructor(t,e,n,r,s,o,i={},a=null){super(),this.id=t,this.authorId=e,this.type=n,this.hasComments=s,this.state=o,this.data=i,this.attributes=a,this.createdAt=new Date(r)}toJSON(){return{id:this.id,authorId:this.authorId,type:this.type,createdAt:this.createdAt.toISOString(),data:JSON.stringify(this.data),hasComments:this.hasComments,state:this.state,attributes:JSON.stringify(this.attributes)}}static fromJSON(t){return new qe(t.id,t.authorId,t.type,t.createdAt,t.hasComments,t.state,JSON.parse(t.data),t.attributes?JSON.parse(t.attributes):null)}}class Le extends i{documentId;static TYPE="102";static READABLE_TYPE_NAME="getAllSuggestions";static DESCRIPTOR_NAME="TrackChangesGetAllSuggestionMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1}}};constructor(t){super(),this.documentId=t}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new Le(t.documentId)}}class Ge extends o{static DESCRIPTOR_NAME="SuggestionDescriptor";static DESCRIPTOR={fields:{id:{id:1,type:"string"},authorId:{id:2,type:"string"},type:{id:3,type:"string"},createdAt:{id:4,type:"string"},data:{id:5,type:"string"},hasComments:{id:6,type:"bool"},state:{id:7,type:"string"},attributes:{id:8,type:"string"}}};static toJSON(t){return{...t,data:t.data?JSON.stringify(t.data):t.data,attributes:t.attributes?JSON.stringify(t.attributes):t.attributes,createdAt:t.createdAt?.toISOString()}}static fromJSON(t){return{...t,data:t.data?JSON.parse(t.data):t.data,attributes:t.attributes?JSON.parse(t.attributes):t.attributes,createdAt:t.createdAt?new Date(t.createdAt):void 0}}}class Ye extends i{_suggestions;_suggestionsV2;suggestions;static DESCRIPTOR_NAME="TrackChangesGetAllSuggestionsResponse";static DESCRIPTOR={fields:{suggestions:{type:"string",rule:"repeated",id:1},suggestionsV2:{type:"SuggestionDescriptor",rule:"repeated",id:2}}};constructor(t,e){super(),this._suggestions=t,this._suggestionsV2=e,this.suggestions=e?.length?e:t}toJSON(){return{suggestions:this._suggestions?.map(t=>JSON.stringify(t)),suggestionsV2:this._suggestionsV2?.map(Ge.toJSON)}}static fromJSON(t){return new Ye(t.suggestions?.map(He),t.suggestionsV2?.map(Ge.fromJSON))}}function He(t){const e=JSON.parse(t);return e.createdAt=e.createdAt?new Date(e.createdAt):void 0,e}class ze extends i{id;documentId;hasComments;isHasCommentsModified;state;attributes;static TYPE="104";static READABLE_TYPE_NAME="updateSuggestion";static DESCRIPTOR_NAME="TrackChangesUpdateSuggestionMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},documentId:{type:"string",id:2},hasComments:{type:"bool",id:3},isHasCommentsModified:{type:"bool",id:4},state:{type:"string",id:5},attributes:{type:"string",id:6}}};constructor(t,e,n,r,s,o=null){super(),this.id=t,this.documentId=e,this.hasComments=n,this.isHasCommentsModified=r,this.state=s,this.attributes=o}toJSON(){return{id:this.id,documentId:this.documentId,hasComments:this.hasComments,isHasCommentsModified:this.isHasCommentsModified,state:this.state,attributes:JSON.stringify(this.attributes)}}static fromJSON(t){return new ze(t.id,t.documentId,t.hasComments,t.isHasCommentsModified,t.state,t.attributes?JSON.parse(t.attributes):null)}}class Fe extends i{documentId;static TYPE="105";static READABLE_TYPE_NAME="connectToSuggestions";static DESCRIPTOR_NAME="TrackChangesConnectMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1}}};constructor(t){super(),this.documentId=t}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new Fe(t.documentId)}}class Ke extends i{channel;_suggestions;_suggestionsV2;suggestions;static DESCRIPTOR_NAME="TrackChangesConnectResponse";static DESCRIPTOR={fields:{channel:{type:"string",id:1},suggestions:{type:"string",rule:"repeated",id:2},suggestionsV2:{type:"SuggestionDescriptor",rule:"repeated",id:3}}};constructor(t,e,n){super(),this.channel=t,this._suggestions=e,this._suggestionsV2=n,this.suggestions=n?.length?n:e}toJSON(){return{channel:this.channel,suggestions:this._suggestions?.map(t=>JSON.stringify(t)),suggestionsV2:this._suggestionsV2?.map(Ge.toJSON)}}static fromJSON(t){return new Ke(t.channel,t.suggestions?.map(t=>JSON.parse(t)),t.suggestionsV2?.map(Ge.fromJSON))}}class We extends i{ids;documentId;state;static TYPE="106";static READABLE_TYPE_NAME="batchUpdateSuggestionsState";static DESCRIPTOR_NAME="TrackChangesBatchUpdateSuggestionsStateMessage";static DESCRIPTOR={fields:{ids:{type:"string",rule:"repeated",id:1},documentId:{type:"string",id:2},state:{type:"string",id:3}}};constructor(t,e,n){super(),this.ids=t,this.documentId=e,this.state=n}toJSON(){return{ids:this.ids,documentId:this.documentId,state:this.state}}static fromJSON(t){return new We(t.ids,t.documentId,t.state)}}class Qe extends((0,n.EmitterMixin)()){_documentId;_isConnected=!1;_wsGateway;_channel;static _SERVICE=10;constructor(t){super(),this._documentId=t}get isConnected(){return this._isConnected}async connect(t){if(this._isConnected)return;if(t.state!==Oe.CONNECTED)throw new Ht("WebSocket Gateway is not connected.",t);const e=new Fe(this._documentId);this._wsGateway=t,this.stopListening(t,"change:state");const n=await t._sendRequest(10,Fe.TYPE,p.encode(e)),r=p.decode(n,Ke);return this.listenTo(t,"change:state",(t,e,n)=>this._onWsGatewayStateChange(n),{priority:we._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(t,r.channel),this._isConnected=!0,this.fire("connected"),r.suggestions}disconnect(){this._isConnected&&(this._isConnected=!1,this._wsGateway&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this._channel&&(this.stopListening(this._channel),this._channel=void 0),this.fire("disconnected"),this.stopListening())}async add(t,e,n,r=null,s){const o=new Be(t,this._documentId,e,n,r,s),i=await this._sendRequest(Be.TYPE,o);return p.decode(i,Je)}async get(t,e=1){const n=new Ue(t,this._documentId);try{const t=await this._sendRequest(Ue.TYPE,n);return p.decode(t,qe)}catch(n){if("CKEditorCloudServicesServerError"===n.name&&"404"===n.code&&e<5)return await(r=100*e,new Promise(t=>{setTimeout(t,r)})),this.get(t,e+1);if("CKEditorCloudServicesServerError"===n.name)throw n;throw zt.fromPublicError(n)}var r}async getAll(){const t=new Le(this._documentId),e=await this._sendRequest(Le.TYPE,t),{suggestions:n}=p.decode(e,Ye);return n}async update(t,e={}){const{hasComments:n,state:r,attributes:s}=e,o=void 0!==n,i=new ze(t,this._documentId,n,o,r,s);await this._sendRequest(ze.TYPE,i)}async batchUpdateState(t){const e=new We(t.ids,this._documentId,t.state);await this._sendRequest(We.TYPE,e)}_connectToChannel(t,e){this._channel=t._getChannel(Qe._SERVICE,e),this._channel&&this.listenTo(this._channel,this._channel.getEventName(ze.TYPE),(t,e)=>{const n=p.decode(e,ze);this.fire("suggestionUpdated",n)})}_onWsGatewayStateChange(t){t===Oe.DISCONNECTED&&this.disconnect()}_sendRequest(t,e){if(!this._wsGateway||!this._isConnected)throw new Ne("Track Changes",this);return this._wsGateway._sendRequest(10,t,p.encode(e))}}const Xe=Qe,Ze={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let $e;const tn=new Uint8Array(16);function en(){if(!$e&&($e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!$e))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return $e(tn)}const nn=[];for(let t=0;t<256;++t)nn.push((t+256).toString(16).slice(1));function rn(t,e=0){return nn[t[e+0]]+nn[t[e+1]]+nn[t[e+2]]+nn[t[e+3]]+"-"+nn[t[e+4]]+nn[t[e+5]]+"-"+nn[t[e+6]]+nn[t[e+7]]+"-"+nn[t[e+8]]+nn[t[e+9]]+"-"+nn[t[e+10]]+nn[t[e+11]]+nn[t[e+12]]+nn[t[e+13]]+nn[t[e+14]]+nn[t[e+15]]}const sn=function(t,e,n){if(Ze.randomUUID&&!e&&!t)return Ze.randomUUID();const r=(t=t||{}).random||(t.rng||en)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(let t=0;t<16;++t)e[n+t]=r[t];return e}return rn(r)};class on extends i{channel;sockets;static DESCRIPTOR_NAME="SessionsConnectResponse";static DESCRIPTOR={fields:{channel:{type:"string",id:1},sockets:{rule:"repeated",type:"SessionsSocketDescriptor",id:2}}};constructor(t,e=[]){super(),this.channel=t,this.sockets=e}toJSON(){return{channel:this.channel,sockets:this.sockets.map(t=>({user:t.userId,session:t.id,role:t.role,permissions:t.permissions}))}}static fromJSON(t){return new on(t.channel,t.sockets.map(t=>({id:t.session,userId:t.user,role:t.role,permissions:t.permissions})))}}class an extends i{id;sessionType;static TYPE="31";static READABLE_TYPE_NAME="getConnectedSockets";static DESCRIPTOR_NAME="SessionsConnectMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},sessionType:{type:"uint32",id:2}}};constructor(t,e){super(),this.id=t,this.sessionType=e}toJSON(){return{id:this.id,sessionType:this.sessionType}}static fromJSON(t){return new an(t.id,t.sessionType)}}class cn extends i{id;userId;role;permissions;static TYPE="32";static READABLE_TYPE_NAME="connectSocket";static DESCRIPTOR_NAME="SocketConnectMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},userId:{type:"string",id:2},role:{type:"string",id:3},permissions:{rule:"repeated",type:"string",id:4}}};constructor(t,e,n,r){super(),this.id=t,this.userId=e,this.role=n,this.permissions=r}toJSON(){return{id:this.id,userId:this.userId??void 0,role:this.role??void 0,permissions:this.permissions??void 0}}static fromJSON(t){return new cn(t.id,t.userId,t.role,t.permissions)}}class un extends i{id;static TYPE="33";static READABLE_TYPE_NAME="disconnectSocket";static DESCRIPTOR_NAME="SocketDisconnectMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1}}};constructor(t){super(),this.id=t}toJSON(){return{id:this.id}}static fromJSON(t){return new un(t.id)}}const dn=class extends n.Collection{_id;_sessionType;_handlers=new Map;_channel;_wsGateway;_connected;_eventsQueue=[];_isRunning=!1;constructor(t,e){super({idProperty:"id"}),this._id=t,this._sessionType=e}async connect(t){this._wsGateway=t,this.stopListening(t,"change:state");const e=new an(this._id,this._sessionType);let n;try{const t=await this._wsGateway._sendRequest(3,an.TYPE,p.encode(e));n=p.decode(t,on)}catch(t){n=new on(this._id,[])}this._connectToChannel(this._wsGateway,n.channel,this._sessionType);const r=await async function(t,e){const n=e.map(t=>t.userId),r=n.length?await I.getMany(t,n):[];return e.map(t=>{const e={id:t.id,role:t.role,permissions:t.permissions};return e.user=t.userId&&r.find(e=>e.id===t.userId)||new I,e})}(this._wsGateway,n.sockets);for(const t of r)super.add(t);this._connected=!0,this.fire("connected"),this.listenTo(this._wsGateway,"change:state",(t,e,n)=>this._onWsGatewayStateChange(n),{priority:we._CHANGE_STATE_EVENT_PRIORITY}),await this._runQueue()}disconnect(t=!0){if(this._connected){for(this._connected=!1,this._eventsQueue=[];this.length;)super.remove(0);this._channel&&(this.stopListening(this._channel),this._channel=void 0),this._wsGateway&&t&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this.fire("disconnected"),t&&this.stopListening()}}add(t,e){throw new TypeError("The collection is read-only.")}remove(t){throw new TypeError("The collection is read-only.")}_connectToChannel(t,e,n){this._channel=t._getChannel(n,e),this._channel&&(this._addHandler(this._channel,cn.TYPE,async e=>{const n=p.decode(e,cn);if(-1===this.getIndex(n.id)){const e={id:n.id,role:n.role,permissions:n.permissions};n.userId&&(e.user=await I.get(t,n.userId)),super.add(e)}}),this._addHandler(this._channel,un.TYPE,t=>{const e=p.decode(t,un);-1!==this.getIndex(e.id)&&super.remove(e.id)}))}async _onWsGatewayStateChange(t){t===we.STATE_DISCONNECTED&&this.disconnect(!1),t===we.STATE_CONNECTED&&await this.connect(this._wsGateway)}async _runQueue(){if(this._isRunning||!this._connected)return;let t;for(this._isRunning=!0;t=this._eventsQueue.shift();){const e=this._handlers.get(t.eventName);e&&await e(t.data)}this._isRunning=!1}_addHandler(t,e,n){const r=t.getEventName(e,!0);this.listenTo(t,r,async(t,e)=>{const n=t.name;this._eventsQueue.push({eventName:n,data:e}),await this._runQueue()}),this._handlers.set(r,n)}};class ln{static async getConnectedSessions(t,e,n){const r=new dn(e,n);return await r.connect(t),r}}class pn extends i{id;buffers;types;bundleVersion;lastOperationId;static TYPE="11";static READABLE_TYPE_NAME="connectToDocument";static DESCRIPTOR_NAME="CollaborativeEditingConnectMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},bundleVersion:{type:"string",id:2},buffers:{rule:"repeated",type:"bytes",id:3},types:{rule:"repeated",type:"uint32",id:4},lastOperationId:{type:"string",id:5}}};constructor(t,e,n,r,s=""){super(),this.id=t,this.buffers=e,this.types=n,this.bundleVersion=r,this.lastOperationId=s}toJSON(){return{id:this.id,buffers:this.buffers,types:this.types,bundleVersion:this.bundleVersion,lastOperationId:this.lastOperationId}}static fromJSON(t){return new pn(t.id,t.buffers,t.types,t.bundleVersion,t.lastOperationId)}}class hn{static prepareMetadataForOperations(t,e){if(!t?.length||!e?.length)return[];const n=[];let r=0;for(const s of t)if(0!==s){if(!e[r])throw new Error("Missing metadata for a operation");n.push(e[r]),r++}else n.push(n[n.length-1]);return n}static removeUnnecessaryMetadata(t,e){if(!t?.length||!e?.length)return[];const n=[];for(let r=0;r<t.length;r++)if(0!==t[r]){if(!e[r])throw new Error("Missing metadata for a operation");n.push(e[r])}return n}}class fn extends o{static DESCRIPTOR_NAME="OperationMetadataDescriptor";static DESCRIPTOR={fields:{userId:{type:"string",id:1},type:{type:"string",id:2},createdAt:{type:"string",id:3}}};static toJSON({createdAt:t,...e}){const n={...e};return t?.toISOString&&(n.createdAt=t.toISOString()),n}static fromJSON({createdAt:t,...e}){const n={...e};return t&&(n.createdAt=new Date(t)),n}}class mn extends i{id;buffers;types;baseVersion;metadata;lastOperationId;static TYPE="13";static READABLE_TYPE_NAME="updateDocument";static DESCRIPTOR_NAME="CollaborativeEditingUpdateMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},baseVersion:{type:"uint32",id:2},buffers:{rule:"repeated",type:"bytes",id:3},types:{rule:"repeated",type:"uint32",id:4},metadata:{rule:"repeated",type:"OperationMetadataDescriptor",id:6},lastOperationId:{type:"string",id:7}}};constructor(t,e,n,r,s=[],o=""){super(),this.id=t,this.buffers=e,this.types=n,this.baseVersion=r,this.metadata=s,this.lastOperationId=o}get data(){return{buffers:this.buffers,types:this.types,baseVersion:this.baseVersion,lastOperationId:this.lastOperationId}}toJSON(){return{id:this.id,buffers:this.buffers,types:this.types,baseVersion:this.baseVersion,metadata:hn.removeUnnecessaryMetadata(this.types,this.metadata).map(fn.toJSON),lastOperationId:this.lastOperationId}}static fromJSON(t){return new mn(t.id,t.buffers,t.types,t.baseVersion,hn.prepareMetadataForOperations(t.types,t.metadata).map(fn.fromJSON),t.lastOperationId)}}class gn extends i{id;lastKnowVersion;bundleVersion;static TYPE="12";static READABLE_TYPE_NAME="reconnectToDocument";static DESCRIPTOR_NAME="CollaborativeEditingReconnectMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},bundleVersion:{type:"string",id:2},lastKnowVersion:{type:"uint32",id:3}}};constructor(t,e,n){super(),this.id=t,this.lastKnowVersion=e,this.bundleVersion=n}toJSON(){return{id:this.id,bundleVersion:this.bundleVersion,lastKnowVersion:this.lastKnowVersion}}static fromJSON(t){return new gn(t.id,t.lastKnowVersion,t.bundleVersion)}}class yn extends i{version;buffers;types;metadata;lastOperationId;lastOperationAcceptedAt;static DESCRIPTOR_NAME="CollaborativeEditingResponse";static DESCRIPTOR={fields:{version:{type:"uint32",id:1},buffers:{rule:"repeated",type:"bytes",id:2},types:{rule:"repeated",type:"uint32",id:3},metadata:{rule:"repeated",type:"OperationMetadataDescriptor",id:5},lastOperationId:{type:"string",id:6},lastOperationAcceptedAt:{type:"string",id:7}}};constructor(t,e=[],n=[],r=[],s="",o=null){super(),this.version=t,this.buffers=e,this.types=n,this.metadata=r,this.lastOperationId=s,this.lastOperationAcceptedAt=o}get data(){return{buffers:this.buffers,types:this.types,baseVersion:this.version-this.types.length,lastOperationId:this.lastOperationId,lastOperationAcceptedAt:this.lastOperationAcceptedAt}}get wereChangesApplied(){return!this.types?.length}toJSON(){return{version:this.version,buffers:this.buffers,types:this.types,metadata:hn.removeUnnecessaryMetadata(this.types,this.metadata).map(fn.toJSON),lastOperationId:this.lastOperationId,lastOperationAcceptedAt:this.lastOperationAcceptedAt instanceof Date?this.lastOperationAcceptedAt.toISOString():this.lastOperationAcceptedAt}}static fromJSON(t){return new yn(t.version,t.buffers,t.types,hn.prepareMetadataForOperations(t.types,t.metadata).map(fn.fromJSON),t.lastOperationId,t.lastOperationAcceptedAt?new Date(t.lastOperationAcceptedAt):null)}static create(t){return new yn(t.version,t.buffers,t.types,t.metadata,t.lastOperationId,t.lastOperationAcceptedAt?new Date(t.lastOperationAcceptedAt):null)}}class bn extends i{channel;version;buffers;types;offset;metadata;initData;sessionId;lastOperationId;sessionCreatedAt;static DESCRIPTOR_NAME="CollaborativeEditingConnectResponse";static DESCRIPTOR=(()=>({fields:{channel:{type:"string",id:1},offset:{type:"uint32",id:2},version:{type:"uint32",id:3},buffers:{rule:"repeated",type:"bytes",id:4},types:{rule:"repeated",type:"uint32",id:5},metadata:{rule:"repeated",type:fn.DESCRIPTOR_NAME,id:7},initData:{type:"string",id:8},isInitialized:{type:"bool",id:9},sessionId:{type:"string",id:10},lastOperationId:{type:"string",id:11},sessionCreatedAt:{type:"string",id:12}}}))();constructor(t,e,n=[],r=[],s=0,o=[],i=null,a="",c="",u=null){super(),this.channel=t,this.version=e,this.buffers=n,this.types=r,this.offset=s,this.metadata=o,this.initData=i,this.sessionId=a,this.lastOperationId=c,this.sessionCreatedAt=u}get data(){return{buffers:this.buffers,types:this.types,baseVersion:this.version-this.types.length,lastOperationId:this.lastOperationId,sessionCreatedAt:this.sessionCreatedAt}}get wereChangesApplied(){return!this.types?.length&&null===this.initData}toJSON(){return{channel:this.channel,version:this.version,sessionId:this.sessionId,buffers:this.buffers,types:this.types,offset:this.offset,metadata:hn.removeUnnecessaryMetadata(this.types,this.metadata).map(fn.toJSON),initData:this.initData??"",isInitialized:"string"==typeof this.initData,lastOperationId:this.lastOperationId,sessionCreatedAt:this.sessionCreatedAt?this.sessionCreatedAt.toISOString():null}}static create(t){return new bn(t.channel,t.version,t.buffers,t.types,t.offset,t.metadata,t.initData,t.sessionId,t.lastOperationId,t.sessionCreatedAt)}static fromJSON(t){let e=null;return!0===t.isInitialized?e=t.initData??"":"boolean"!=typeof t.isInitialized&&t.initData&&(e=t.initData),bn.create({channel:t.channel,version:t.version,buffers:t.buffers,types:t.types,offset:t.offset,metadata:hn.prepareMetadataForOperations(t.types,t.metadata).map(fn.fromJSON),initData:e,sessionId:t.sessionId,lastOperationId:t.lastOperationId,sessionCreatedAt:t.sessionCreatedAt?new Date(t.sessionCreatedAt):null})}}class In extends i{lastDocumentSession;currentDocumentSession;static DESCRIPTOR_NAME="GetDocumentDetailsResponse";static DESCRIPTOR={fields:{lastDocumentSessionId:{type:"string",id:1},lastDocumentSessionOperationId:{type:"string",id:2},currentDocumentSessionId:{type:"string",id:3},currentDocumentSessionVersion:{type:"uint32",id:4},currentDocumentSessionOperationId:{type:"string",id:5}}};constructor(t,e){super(),this.lastDocumentSession=t,this.currentDocumentSession=e}get data(){return{lastDocumentSessionId:this.lastDocumentSession?.id,lastDocumentSessionOperationId:this.lastDocumentSession?.lastOperationId,currentDocumentSessionId:this.currentDocumentSession?.id,currentDocumentSessionVersion:this.currentDocumentSession?.version,currentDocumentSessionOperationId:this.currentDocumentSession?.lastOperationId}}toJSON(){return{lastDocumentSessionId:this.lastDocumentSession?.id,lastDocumentSessionOperationId:this.lastDocumentSession?.lastOperationId,currentDocumentSessionId:this.currentDocumentSession?.id,currentDocumentSessionVersion:this.currentDocumentSession?.version,currentDocumentSessionOperationId:this.currentDocumentSession?.lastOperationId}}static fromJSON(t){const e=t.lastDocumentSessionId?{id:t.lastDocumentSessionId,lastOperationId:t.lastDocumentSessionOperationId}:void 0,n=t.currentDocumentSessionId?{lastOperationId:t.currentDocumentSessionOperationId,version:t.currentDocumentSessionVersion,id:t.currentDocumentSessionId}:void 0;return new In(e,n)}}class On extends i{documentId;static TYPE="14";static READABLE_TYPE_NAME="getDocumentDetails";static DESCRIPTOR_NAME="GetDocumentDetailsMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1},environmentId:{type:"string",id:2}}};constructor(t){super(),this.documentId=t}get data(){return{documentId:this.documentId}}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new On(t.documentId)}}const vn=class extends((0,n.EmitterMixin)()){static _SERVICE=1;_bundleVersion;_id;_isConnected;_wsGateway;_channel;_connectedSessions;constructor(t,e){if(super(),!t)throw new TypeError('Param "bundleVersion" must be provided.');this._id=e??sn(),this._isConnected=!1,this._bundleVersion=t}getId(){return this._id}isConnected(){return this._isConnected}connect(t,e={buffers:[],types:[]},n){const r=new pn(this.getId(),e.buffers,e.types,this._bundleVersion,n);return this._connect(t,r)}reconnect(t,e){if(this.isConnected())throw new Ht("Cannot reconnect to already connected service.",t);return this._connect(t,new gn(this.getId(),e,this._bundleVersion))}disconnect(){this._isConnected&&(this._isConnected=!1,this._wsGateway&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this._channel&&(this.stopListening(this._channel),this._channel=void 0),this._connectedSessions&&(this._connectedSessions.disconnect(),this._connectedSessions=void 0),this.fire("disconnected"),this.stopListening())}async getDocumentDetails(){const t=new On(this.getId());if(!this._wsGateway)throw new Ne("Collaborative Editing",this);const e=await this._wsGateway._sendRequest(1,On.TYPE,p.encode(t));return p.decode(e,In)}async sendOperations(t,e,n){if(!t?.types?.length)throw new Ht("Cannot send empty update.",this._wsGateway);const r="number"==typeof e?e:parseInt(e);if(!Number.isInteger(r)||r<0)throw new Ht("Base version not provided.",this._wsGateway);const s=new mn(this.getId(),t.buffers,t.types,r,[],n);if(!this._wsGateway||!this._isConnected)throw new Ne("Collaborative Editing",this);const o=await this._wsGateway._sendRequest(1,mn.TYPE,p.encode(s));return p.decode(o,yn)}async getConnectedSessions(){if(!this._isConnected)throw new Ne("Collaborative Editing",this);return this._connectedSessions||(this._connectedSessions=await ln.getConnectedSessions(this._wsGateway,this._id,1)),this._connectedSessions}static getConnectedSessions(t,e){return ln.getConnectedSessions(t,e,1)}async _connect(t,e){if(this.isConnected())return;if(t.state!==we.STATE_CONNECTED)throw new Ht("WebSocket Gateway is not connected.",t);this._wsGateway=t,this.stopListening(t,"change:state");const n=await t._sendRequest(1,e.constructor.TYPE,p.encode(e)),r=p.decode(n,bn);return this.listenTo(t,"change:state",(t,e,n)=>this._onWsGatewayStateChange(n),{priority:we._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(t,r.channel),this._isConnected=!0,this.fire("connected"),r}_connectToChannel(t,e){this._channel=t._getChannel(1,e),this.listenTo(this._channel,this._channel.getEventName(mn.TYPE),(t,e)=>{const n=p.decode(e,mn);this.fire("operationsReceived",n.baseVersion,n.data,n.metadata)})}_onWsGatewayStateChange(t){t===we.STATE_DISCONNECTED&&this.disconnect()}};class wn extends o{static DESCRIPTOR_NAME="CommentDescriptor";static DESCRIPTOR={fields:{commentId:{id:1,type:"string"},commentThreadId:{id:2,type:"string"},userId:{id:3,type:"string"},content:{id:4,type:"string"},documentId:{id:5,type:"string"},createdAt:{id:6,type:"string"},attributes:{id:7,type:"string"}}};static toJSON(t){return{...t,createdAt:t.createdAt?.toISOString(),attributes:t.attributes?JSON.stringify(t.attributes):null}}static fromJSON(t){return{...t,createdAt:new Date(t.createdAt),attributes:t.attributes?JSON.parse(t.attributes):null}}}class Sn extends o{static DESCRIPTOR_NAME="CommentsThreadDescriptor";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},comments:{type:"CommentDescriptor",rule:"repeated",id:2},resolvedAt:{type:"string",id:3},resolvedBy:{type:"string",id:4},context:{type:"string",id:5},createdAt:{type:"string",id:6},deletedAt:{type:"string",id:7},attributes:{type:"string",id:8},unlinkedAt:{type:"string",id:9}}};static toJSON(t){return{...t,createdAt:t.createdAt?.toISOString(),deletedAt:t.deletedAt?.toISOString(),resolvedAt:t.resolvedAt?.toISOString(),attributes:t.attributes?JSON.stringify(t.attributes):null,context:t.context?JSON.stringify(t.context):t.context,comments:t.comments?.map(wn.toJSON),unlinkedAt:t.unlinkedAt?.toISOString()}}static fromJSON(t){return{...t,createdAt:t.createdAt?new Date(t.createdAt):void 0,deletedAt:t.deletedAt?new Date(t.deletedAt):void 0,resolvedAt:t.resolvedAt?new Date(t.resolvedAt):void 0,attributes:t.attributes?JSON.parse(t.attributes):null,context:t.context?JSON.parse(t.context):void 0,comments:t.comments?.map(wn.fromJSON),unlinkedAt:t.unlinkedAt?new Date(t.unlinkedAt):void 0}}}class kn extends i{documentId;commentThreadId;content;commentId;userId;attributes;commentThread;createdAt;static TYPE="91";static READABLE_TYPE_NAME="addComment";static DESCRIPTOR_NAME="CommentsV2AddCommentMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},content:{type:"string",id:2},documentId:{type:"string",id:3},commentId:{type:"string",id:4},createdAt:{type:"string",id:5},userId:{type:"string",id:6},attributes:{type:"string",id:7},commentThread:{type:"CommentsThreadDescriptor",id:8}}};constructor(t,e,n,r="",s,o="",i=null,a){super(),this.documentId=t,this.commentThreadId=e,this.content=n,this.commentId=r,this.userId=o,this.attributes=i,this.commentThread=a,this.createdAt=s?new Date(s):""}toJSON(){return{commentThreadId:this.commentThreadId,content:this.content,documentId:this.documentId,commentId:this.commentId,createdAt:this.createdAt instanceof Date?this.createdAt.toISOString():this.createdAt,userId:this.userId,attributes:JSON.stringify(this.attributes),commentThread:this.commentThread?Sn.toJSON(this.commentThread):void 0}}static fromJSON(t){return new kn(t.documentId,t.commentThreadId,t.content,t.commentId?t.commentId:void 0,t.createdAt?new Date(t.createdAt):void 0,t.userId?t.userId:void 0,t.attributes?JSON.parse(t.attributes):{},t.commentThread?Sn.fromJSON(t.commentThread):void 0)}}class An extends i{commentThreadId;commentId;createdAt;static DESCRIPTOR_NAME="CommentsV2AddCommentResponse";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},commentId:{type:"string",id:2},createdAt:{type:"string",id:3}}};constructor(t,e,n){super(),this.commentThreadId=t,this.commentId=e,this.createdAt=new Date(n)}toJSON(){return{commentThreadId:this.commentThreadId,commentId:this.commentId,createdAt:this.createdAt.toISOString()}}static fromJSON(t){return new An(t.commentThreadId,t.commentId,t.createdAt)}}class Tn extends i{documentId;static TYPE="92";static READABLE_TYPE_NAME="connectToComment";static DESCRIPTOR_NAME="CommentsV2ConnectMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1}}};constructor(t){super(),this.documentId=t}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new Tn(t.documentId)}}class _n extends i{channel;_threads;_threadsV2;threads;static DESCRIPTOR_NAME="CommentsV2ConnectResponse";static DESCRIPTOR={fields:{channel:{type:"string",id:1},threads:{type:"string",rule:"repeated",id:2},threadsV2:{type:"CommentsThreadDescriptor",rule:"repeated",id:3}}};constructor(t,e,n){super(),this.channel=t,this._threads=e,this._threadsV2=n,this.threads=n?.length?n:e}toJSON(){return{channel:this.channel,threads:this._threads?.map(t=>JSON.stringify(t)),threadsV2:this._threadsV2?.map(Sn.toJSON)}}static fromJSON(t){return new _n(t.channel,t.threads?.map(t=>JSON.parse(t)),t.threadsV2?.map(Sn.fromJSON))}}class Cn extends i{documentId;commentThreadId;commentId;static TYPE="95";static READABLE_TYPE_NAME="removeComment";static DESCRIPTOR_NAME="CommentsV2RemoveCommentMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},commentId:{type:"string",id:2},documentId:{type:"string",id:3}}};constructor(t,e,n){super(),this.documentId=t,this.commentThreadId=e,this.commentId=n}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId,commentId:this.commentId}}static fromJSON(t){return new Cn(t.documentId,t.commentThreadId,t.commentId)}}class Pn extends i{documentId;commentThreadId;static TYPE="97";static READABLE_TYPE_NAME="removeCommentThread";static DESCRIPTOR_NAME="CommentsV2RemoveCommentThreadMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2}}};constructor(t,e){super(),this.documentId=t,this.commentThreadId=e}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId}}static fromJSON(t){return new Pn(t.documentId,t.commentThreadId)}}class En extends i{documentId;commentThreadId;commentId;content;attributes;isAttributesUpdated;commentThread;static TYPE="96";static READABLE_TYPE_NAME="updateComment";static DESCRIPTOR_NAME="CommentsV2UpdateCommentMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},commentId:{type:"string",id:2},content:{type:"string",id:3},documentId:{type:"string",id:4},attributes:{type:"string",id:5},isAttributesUpdated:{type:"bool",id:6},commentThread:{type:"CommentsThreadDescriptor",id:7}}};constructor(t,e,n,r,s=null,o=!1,i){super(),this.documentId=t,this.commentThreadId=e,this.commentId=n,this.content=r,this.attributes=s,this.isAttributesUpdated=o,this.commentThread=i}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId,commentId:this.commentId,content:this.content,attributes:this.attributes?JSON.stringify(this.attributes):null,isAttributesUpdated:this.isAttributesUpdated,commentThread:this.commentThread?Sn.toJSON(this.commentThread):void 0}}static fromJSON(t){return new En(t.documentId,t.commentThreadId,t.commentId,t.content,t.attributes?JSON.parse(t.attributes):null,t.isAttributesUpdated,t.commentThread?Sn.fromJSON(t.commentThread):void 0)}}class jn extends i{commentThreadId;documentId;static TYPE="93";static READABLE_TYPE_NAME="getComment";static DESCRIPTOR_NAME="CommentsV2GetCommentThreadMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2}}};constructor(t,e){super(),this.commentThreadId=t,this.documentId=e}toJSON(){return{commentThreadId:this.commentThreadId,documentId:this.documentId}}static fromJSON(t){return new jn(t.commentThreadId,t.documentId)}}class Dn extends i{commentThreadId;_comments;_commentsV2;resolvedBy;comments;createdAt;deletedAt;resolvedAt;attributes;context;unlinkedAt;static DESCRIPTOR_NAME="CommentsV2GetCommentThreadResponse";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},comments:{type:"string",rule:"repeated",id:2},commentsV2:{type:"CommentDescriptor",rule:"repeated",id:3},resolvedAt:{type:"string",id:4},resolvedBy:{type:"string",id:5},context:{type:"string",id:6},createdAt:{type:"string",id:7},deletedAt:{type:"string",id:8},attributes:{type:"string",id:9},unlinkedAt:{type:"string",id:10}}};constructor(t,e,n,r,s,o,i,a,c,u){super(),this.commentThreadId=t,this._comments=e,this._commentsV2=n,this.resolvedBy=s,this.comments=n?.length?n:e,this.createdAt=i?new Date(i):void 0,this.deletedAt="string"==typeof a?new Date(a):a,this.resolvedAt="string"==typeof c?new Date(c):c,this.unlinkedAt="string"==typeof u?new Date(u):u,this.attributes="string"==typeof r?JSON.parse(r):r,this.context="string"==typeof o?JSON.parse(o):o}toJSON(){return{commentThreadId:this.commentThreadId,comments:this._comments?.map(t=>JSON.stringify(t)),commentsV2:this._commentsV2?.map(wn.toJSON),attributes:this.attributes?JSON.stringify(this.attributes):this.attributes,context:this.context?JSON.stringify(this.context):this.context,resolvedBy:this.resolvedBy,createdAt:this.createdAt?.toISOString(),deletedAt:this.deletedAt?.toISOString(),resolvedAt:this.resolvedAt?.toISOString(),unlinkedAt:this.unlinkedAt?.toISOString()}}static fromJSON(t){return new Dn(t.commentThreadId,t.comments?.map(t=>function(t){const e=JSON.parse(t);return{...e,createdAt:new Date(e.createdAt)}}(t)),t.commentsV2?.map(wn.fromJSON),t.attributes?JSON.parse(t.attributes):t.attributes,t.resolvedBy,t.context?JSON.parse(t.context):t.context,t.createdAt,t.deletedAt,t.resolvedAt,t.unlinkedAt)}}class xn extends i{documentId;static TYPE="94";static READABLE_TYPE_NAME="getDocumentThreads";static DESCRIPTOR_NAME="CommentsV2GetDocumentThreadsMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1}}};constructor(t){super(),this.documentId=t}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new xn(t.documentId)}}class Rn extends i{_threads;_threadsV2;threads;static DESCRIPTOR_NAME="CommentsV2GetDocumentThreadsResponse";static DESCRIPTOR={fields:{threads:{type:"string",rule:"repeated",id:1},threadsV2:{type:"CommentsThreadDescriptor",rule:"repeated",id:2}}};constructor(t,e){super(),this._threads=t,this._threadsV2=e,this.threads=e?.length?e:t}toJSON(){return{threads:this._threads?.map(t=>JSON.stringify(t)),threadsV2:this._threadsV2?.map(Sn.toJSON)}}static fromJSON(t){return new Rn(t.threads?.map(t=>function(t){const e=JSON.parse(t),n={...e};return e.comments&&(n.comments=e.comments?.map(t=>({...t,createdAt:new Date(t.createdAt)}))),n}(t)),t.threadsV2?.map(Sn.fromJSON))}}class Nn extends o{static DESCRIPTOR_NAME="CommentThreadAddedCommentDescriptor";static DESCRIPTOR={fields:{commentId:{id:1,type:"string"},createdAt:{id:2,type:"string"}}};static toJSON(t){return{commentId:t.commentId,createdAt:t.createdAt?.toISOString()}}static fromJSON(t){return{commentId:t.commentId,createdAt:new Date(t.createdAt)}}}class Vn extends i{commentThreadId;comments;createdAt;static DESCRIPTOR_NAME="CommentsV2AddCommentThreadResponse";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},createdAt:{type:"string",id:2},comments:{type:"CommentThreadAddedCommentDescriptor",rule:"repeated",id:3}}};constructor(t,e,n=[]){super(),this.commentThreadId=t,this.comments=n,this.createdAt=new Date(e)}toJSON(){return{commentThreadId:this.commentThreadId,createdAt:this.createdAt.toISOString(),comments:this.comments.map(t=>Nn.toJSON(t))}}static fromJSON(t){return new Vn(t.commentThreadId,t.createdAt,t.comments.map(t=>Nn.fromJSON(t)))}}class Mn extends i{documentId;commentThreadId;comments;context;resolvedBy;attributes;createdAt;resolvedAt;deletedAt;static TYPE="140";static READABLE_TYPE_NAME="addCommentThread";static DESCRIPTOR_NAME="CommentsV2AddCommentThreadMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1},commentThreadId:{type:"string",id:2},context:{type:"string",id:3},createdAt:{type:"string",id:4},resolvedAt:{type:"string",id:5},resolvedBy:{type:"string",id:6},attributes:{type:"string",id:7},deletedAt:{type:"string",id:8},comments:{type:"CommentDescriptor",rule:"repeated",id:9}}};constructor(t,e,n=[],r,s=null,o=null,i=null,a=null,c=null){super(),this.documentId=t,this.commentThreadId=e,this.comments=n,this.context=r,this.resolvedBy=s,this.attributes=c,this.createdAt=o?new Date(o):"",this.resolvedAt=i?new Date(i):"",this.deletedAt=a?new Date(a):""}toJSON(){return{commentThreadId:this.commentThreadId,context:this.context?JSON.stringify(this.context):this.context,documentId:this.documentId,resolvedBy:this.resolvedBy,resolvedAt:this.resolvedAt instanceof Date?this.resolvedAt.toISOString():this.resolvedAt,deletedAt:this.deletedAt instanceof Date?this.deletedAt.toISOString():this.deletedAt,createdAt:this.createdAt instanceof Date?this.createdAt.toISOString():this.createdAt,attributes:this.attributes?JSON.stringify(this.attributes):this.attributes,comments:this.comments?.map(t=>wn.toJSON(t))}}static fromJSON(t){return new Mn(t.documentId,t.commentThreadId,t.comments?.map(e=>wn.fromJSON({...e,documentId:t.documentId,commentThreadId:t.commentThreadId})),t.context?JSON.parse(t.context):t.context,t.resolvedBy,t.createdAt?new Date(t.createdAt):void 0,t.resolvedAt?new Date(t.resolvedAt):void 0,t.deletedAt?new Date(t.deletedAt):void 0,t.attributes?JSON.parse(t.attributes):t.attributes)}}class Bn extends i{commentThreadId;documentId;resolvedBy;resolvedAt;static TYPE="142";static READABLE_TYPE_NAME="resolveCommentThread";static DESCRIPTOR_NAME="CommentsV2ResolveCommentThreadMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2},resolvedBy:{type:"string",id:3},resolvedAt:{type:"string",id:4}}};constructor(t,e,n,r){super(),this.commentThreadId=t,this.documentId=e,this.resolvedBy=n,this.resolvedAt=r?new Date(r):void 0}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId,resolvedBy:this.resolvedBy,resolvedAt:this.resolvedAt?.toISOString()}}static fromJSON(t){return new Bn(t.commentThreadId,t.documentId,t.resolvedBy,t.resolvedAt)}}class Jn extends i{commentThreadId;documentId;static TYPE="141";static READABLE_TYPE_NAME="reopenCommentThread";static DESCRIPTOR_NAME="CommentsV2ReopenCommentThreadMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2}}};constructor(t,e){super(),this.commentThreadId=t,this.documentId=e}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId}}static fromJSON(t){return new Jn(t.commentThreadId,t.documentId)}}class Un extends i{commentThreadId;documentId;context;attributes;unlinkedAt;static TYPE="143";static READABLE_TYPE_NAME="updateCommentThread";static DESCRIPTOR_NAME="CommentsV2UpdateCommentThreadMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2},context:{type:"string",id:3},attributes:{type:"string",id:4},unlinkedAt:{type:"string",id:5}}};constructor(t,e,n,r=null,s=null){super(),this.commentThreadId=t,this.documentId=e,this.context=n,this.attributes=r,this.unlinkedAt=s?new Date(s):""}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId,context:this.context?JSON.stringify(this.context):this.context,attributes:this.attributes?JSON.stringify(this.attributes):null,unlinkedAt:this.unlinkedAt instanceof Date?this.unlinkedAt.toISOString():this.unlinkedAt}}static fromJSON(t){return new Un(t.commentThreadId,t.documentId,t.context?JSON.parse(t.context):t.context,t.attributes?JSON.parse(t.attributes):null,t.unlinkedAt?new Date(t.unlinkedAt):null)}}class qn extends i{commentThreadId;documentId;resolvedBy;resolvedAt;static DESCRIPTOR_NAME="CommentsV2ResolveCommentThreadResponse";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2},resolvedAt:{type:"string",id:3},resolvedBy:{type:"string",id:4}}};constructor(t,e,n,r){super(),this.commentThreadId=t,this.documentId=e,this.resolvedBy=n,this.resolvedAt=new Date(r)}toJSON(){return{commentThreadId:this.commentThreadId,documentId:this.documentId,resolvedBy:this.resolvedBy,resolvedAt:this.resolvedAt.toISOString()}}static fromJSON(t){return new qn(t.commentThreadId,t.documentId,t.resolvedBy,t.resolvedAt)}}class Ln extends((0,n.EmitterMixin)()){_documentId;_isConnected=!1;_wsGateway;_channel;_connectedSessions;static _SERVICE=9;constructor(t){super(),this._documentId=t}get isConnected(){return this._isConnected}async connect(t){if(this._isConnected)return;if(t.state!==Oe.CONNECTED)throw new Ht("WebSocket Gateway is not connected.",t);const e=new Tn(this._documentId);this._wsGateway=t,this.stopListening(t,"change:state");const n=await t._sendRequest(9,Tn.TYPE,p.encode(e)),{channel:r,threads:s}=p.decode(n,_n);return this.listenTo(t,"change:state",(t,e,n)=>this._onWsGatewayStateChange(n),{priority:we._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(t,r),this._isConnected=!0,this.fire("connected"),s}disconnect(){this._isConnected&&(this._isConnected=!1,this._wsGateway&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this._channel&&(this.stopListening(this._channel),this._channel=void 0),this._connectedSessions&&(this._connectedSessions.disconnect(),this._connectedSessions=void 0),this.fire("disconnected"),this.stopListening())}async addComment(t,e,n,r){const s=new kn(this._documentId,t,n,e,void 0,void 0,r),o=await this._sendRequest(kn.TYPE,s);return p.decode(o,An)}async updateComment(t,e,n,r){const s=void 0!==r,o=new En(this._documentId,t,e,n,r,s);await this._sendRequest(En.TYPE,o)}async removeComment(t,e){const n=new Cn(this._documentId,t,e);await this._sendRequest(Cn.TYPE,n)}async removeCommentThread(t){const e=new Pn(this._documentId,t);await this._sendRequest(Pn.TYPE,e)}async addCommentThread(t){const e=new Mn(this._documentId,t.commentThreadId,t.comments?.map(e=>({...e,documentId:this._documentId,commentThreadId:t.commentThreadId})),t.context,t.resolvedBy,t.createdAt,t.resolvedAt,t.deletedAt,t.attributes),n=await this._sendRequest(Mn.TYPE,e);return p.decode(n,Vn)}async resolveCommentThread(t){const e=new Bn(t,this._documentId),n=await this._sendRequest(Bn.TYPE,e);return p.decode(n,qn)}async reopenCommentThread(t){const e=new Jn(t,this._documentId);await this._sendRequest(Jn.TYPE,e)}async updateCommentThread(t){const e=new Un(t.commentThreadId,this._documentId,t.context,t.attributes,t.unlinkedAt);await this._sendRequest(Un.TYPE,e)}async getCommentThread(t,e=1){const n=new jn(t,this._documentId);try{const t=await this._sendRequest(jn.TYPE,n),e=p.decode(t,Dn);return{commentThreadId:e.commentThreadId,comments:e.comments,attributes:e.attributes,context:e.context,resolvedAt:e.resolvedAt,resolvedBy:e.resolvedBy,deletedAt:e.deletedAt,unlinkedAt:e.unlinkedAt}}catch(n){if("CKEditorCloudServicesServerError"===n.name&&"404"===n.code&&e<5)return await(r=100*e,new Promise(t=>{setTimeout(t,r)})),this.getCommentThread(t,e+1);if("CKEditorCloudServicesServerError"===n.name)throw n;throw zt.fromPublicError(n)}var r}async getDocumentThreads(){const t=new xn(this._documentId),e=await this._sendRequest(xn.TYPE,t),{threads:n}=p.decode(e,Rn);return{threads:n}}async getConnectedSessions(){if(!this._isConnected)throw new Ne("Comments",this);return this._connectedSessions||(this._connectedSessions=await ln.getConnectedSessions(this._wsGateway,this._documentId,9)),this._connectedSessions}_connectToChannel(t,e){this._channel=t._getChannel(Ln._SERVICE,e),this._channel&&(this.listenTo(this._channel,this._channel.getEventName(kn.TYPE),(t,e)=>{const n=p.decode(e,kn);this.fire("commentAdded",n)}),this.listenTo(this._channel,this._channel.getEventName(Cn.TYPE),(t,e)=>{const n=p.decode(e,Cn);this.fire("commentRemoved",n)}),this.listenTo(this._channel,this._channel.getEventName(En.TYPE),(t,e)=>{const n=p.decode(e,En);this.fire("commentUpdated",n)}),this.listenTo(this._channel,this._channel.getEventName(Pn.TYPE),(t,e)=>{const n=p.decode(e,Pn);this.fire("commentThreadRemoved",n)}),this.listenTo(this._channel,this._channel.getEventName(Mn.TYPE),(t,e)=>{const n=p.decode(e,Mn);this.fire("commentThreadAdded",n)}),this.listenTo(this._channel,this._channel.getEventName(Un.TYPE),(t,e)=>{const n=p.decode(e,Un);this.fire("commentThreadUpdated",n)}),this.listenTo(this._channel,this._channel.getEventName(Bn.TYPE),(t,e)=>{const n=p.decode(e,Bn);this.fire("commentThreadResolved",n)}),this.listenTo(this._channel,this._channel.getEventName(Jn.TYPE),(t,e)=>{const n=p.decode(e,Jn);this.fire("commentThreadReopened",n)}))}_onWsGatewayStateChange(t){t===Oe.DISCONNECTED&&this.disconnect()}_sendRequest(t,e){if(!this._wsGateway||!this._isConnected)throw new Ne("Comments",this);return this._wsGateway._sendRequest(9,t,p.encode(e))}}const Gn=Ln;function Yn(t,e){const n=zn();return(Yn=function(t,e){return n[t-=339]})(t,e)}const Hn=Yn;function zn(){const t=["DISCONNECTED","2nQUDnq","removeFromReconnectionStack","listenTo","webSocketUrl","websocketgateway-missing-websocket-url","The limit of maximum concurrent connections that the collaboration server can handle has been reached. Try opening the document again in a few minutes. Please contact your system administrator if the problem persists.","1096782CEGpKI","isInReconnectionStack","isPremiumPlugin","real-time-collaboration","code","limitExceeded","1030923vrohdd","online","plugins","initialReconnectionInterval","WebSocketGateway","connected","cloudservices-init","destroy","cloudservices-reconnection-error","set","reconnect","652CMgUmn","_reconnect","get","612231UJWiKO","CloudServices","all","change:me","offline","stopListening","websocketgateway-plugin-already-registered","constructor","connection","Connected users limit exceeded","delete","addToReconnectionStack","state","websocketgateway-invalid-plugin-interface","connect","init","define","token","then","_domEmitter","cloudServices.connectionTimeout","error","config","context","function","_reconnectionStack","from","5138040QvpNGd","cloudServices.requestTimeout","CONNECTING","catch","1863981uwuHBj","_shouldPluginsReconnect","add","CONNECTED","pluginName","641751SfrFHr","disconnect","3050BTSVZc","20gyGwKs","requires","websocketgateway-missing-token","isOfficialPlugin","has","showWarning","_isBrowserOffline","bind"];return(zn=function(){return t})()}!function(t){const e=Yn,n=t();for(;;)try{if(416723===parseInt(e(346))/1*(parseInt(e(358))/2)+parseInt(e(384))/3+-parseInt(e(381))/4*(parseInt(e(348))/5)+-parseInt(e(364))/6+parseInt(e(341))/7+-parseInt(e(411))/8+parseInt(e(370))/9*(parseInt(e(349))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(zn);class Fn extends e.ContextPlugin{static[Hn(374)]=(()=>we)();static[Hn(373)]=1e3;[Hn(392)];[Hn(409)];[Hn(342)];[Hn(403)];static get[Hn(350)](){return[Hn(385),r.Notification]}static get[Hn(345)](){return Hn(374)}static get[Hn(352)](){return!0}static get[Hn(366)](){return!0}constructor(t){const e=Hn;super(t),this[e(379)](e(396),Oe[e(344)]),this[e(379)](e(355),!1),this[e(409)]=new Set,this[e(342)]=!1,this[e(403)]=new((0,n.DomEmitterMixin)())}[Hn(399)](){const t=Hn,e=this[t(407)],s=e[t(372)][t(383)](t(385)),o=e[t(372)][t(383)](r.Notification);if(!s[t(401)])throw new n.CKEditorError(t(351),this);if(!s[t(361)])throw new n.CKEditorError(t(362),this);return this[t(403)][t(360)](window,t(388),()=>this[t(355)]=!0),this[t(403)][t(360)](window,t(371),()=>this[t(355)]=!1),this[t(407)][t(406)][t(400)](t(404),10),this[t(407)][t(406)][t(400)](t(412),20),Fn[t(374)][t(398)](s[t(401)],s[t(361)],{timeout:1e3*this[t(407)][t(406)][t(383)](t(404)),requestTimeout:1e3*this[t(407)][t(406)][t(383)](t(412))})[t(402)](e=>{const r=t;if(this[r(392)]=e,this[r(356)](r(396)).to(e,r(396),this,r(355),(t,e)=>(r(375)!==t&&(this[r(342)]=!0),e||t!==Oe[r(344)]?Oe[r(357)]:this[r(396)]==Oe[r(357)]&&this[r(342)]?(this[r(342)]=!1,this[r(382)](),Oe[r(339)]):Oe[r(344)])),this[r(392)].on(r(405),(t,e)=>{const s=r;if(s(369)!==e[s(368)])throw console[s(405)](e),new n.CKEditorError(s(376),null,{originalError:e});o[s(354)](s(363),{title:s(393),namespace:s(367)})}),!e.me)return new Promise(t=>e.on(r(387),t))})[t(340)](e=>{const r=t;throw console[r(405)](e),new n.CKEditorError(r(376),null,{originalError:e})})}[Hn(395)](t){const e=Hn;if(e(408)!=typeof t[e(380)])throw new n.CKEditorError(e(397),this);if(this[e(365)](t))throw new n.CKEditorError(e(390),this,{name:t[e(391)][e(345)]});this[e(409)][e(343)](t)}[Hn(359)](t){const e=Hn;this[e(409)][e(394)](t)}[Hn(365)](t){const e=Hn;return this[e(409)][e(353)](t)}[Hn(382)](){const t=Hn;return this[t(392)][t(380)]()[t(402)](()=>Promise[t(386)](Array[t(410)](this[t(409)],e=>e[t(380)]())))[t(402)](()=>this[t(396)]=Oe[t(344)])[t(340)](e=>{const r=t;throw console[r(405)](e),new n.CKEditorError(r(378),this[r(407)])})}[Hn(347)](){const t=Hn;this[t(392)]&&this[t(392)][t(347)](),this[t(396)]=Oe[t(357)],this[t(403)][t(389)]()}[Hn(377)](){const t=Hn;this[t(347)](),super[t(377)]()}}var Kn=__webpack_require__(211);const Wn=Qn;function Qn(t,e){const n=Xn();return(Qn=function(t,e){return n[t-=175]})(t,e)}function Xn(){const t=["178074hrCrVM","isOfficialPlugin","register","values","assign","getUserBySessionId","_handleSessionAdd","requires","plugins","_handleSessionRemove","4rnIohe","channelSessions","48204yAJlqu","has","state","_users","connection","stopListening","3YwjftU","fire","_uniqueUsersCount","role","357IoBlQA","sessions-register-already-registered","sessionId","listenTo","remove","add","getUser","allConnectedUsers","_createUser","mySessionId","connected","init","_registeredSessions","isPremiumPlugin","getUserRole","3642570eoqmhq","defineMe","delete","1316736Ciwbqo","unregister","hiddenInPresenceList","get","2530086JzOBpI","sessionAdd:","context","Sessions","user","channelConnectedUsers","clear","getUserSessions","orderNumber","sessions-unregister-not-exist","8841753MyILFX","14051760eQBkHH","set","isMe","pluginName","change:state","size","forEach","addUser"];return(Xn=function(){return t})()}!function(t){const e=Qn,n=t();for(;;)try{if(615126===parseInt(e(195))/1*(-parseInt(e(177))/2)+-parseInt(e(221))/3*(parseInt(e(187))/4)+parseInt(e(214))/5+parseInt(e(189))/6*(parseInt(e(199))/7)+parseInt(e(217))/8+-parseInt(e(231))/9+parseInt(e(232))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Xn);class Zn extends e.ContextPlugin{[Wn(188)];[Wn(226)];[Wn(206)];[Wn(211)];[Wn(197)];[Wn(192)];static get[Wn(235)](){return Wn(224)}static get[Wn(178)](){return!0}static get[Wn(212)](){return!0}static get[Wn(184)](){return[Fn,Kn.Users]}constructor(t){const e=Wn;super(t),this[e(188)]=new Map,this[e(226)]=new Map,this[e(206)]=new n.Collection,this[e(211)]=new Map,this[e(197)]=0,this[e(192)]=this[e(223)][e(185)][e(220)](Kn.Users)}[Wn(210)](){const t=Wn,e=this[t(223)][t(185)][t(220)](Fn);this[t(202)](e,t(236),(e,n,r)=>{const s=t;if(s(209)!==r)this[s(188)][s(175)](t=>t[s(227)]()),this[s(226)][s(175)](t=>t[s(227)]()),this[s(206)][s(227)]();else for(const[t,e]of this[s(211)])for(const n of e)this[s(183)](t,n)}),this[t(207)](e[t(193)].me,!0)}[Wn(179)](t,e){const r=Wn;if(this[r(211)][r(190)](t))throw new n.CKEditorError(r(200),null,{channelId:t});this[r(211)][r(233)](t,e),this[r(188)][r(233)](t,new n.Collection),this[r(226)][r(233)](t,new n.Collection),this[r(202)](e,r(204),(e,n)=>this[r(183)](t,n)),this[r(202)](e,r(203),(e,n)=>this[r(186)](t,n));for(const n of e)this[r(183)](t,n)}[Wn(218)](t){const e=Wn;if(!this[e(211)][e(190)](t))throw new n.CKEditorError(e(230),null,{channelId:t});const r=this[e(211)][e(220)](t);this[e(194)](r);for(const n of r)e(209)===this[e(223)][e(185)][e(220)](Fn)[e(191)]&&this[e(186)](t,n);this[e(211)][e(216)](t),this[e(188)][e(216)](t),this[e(226)][e(216)](t)}get[Wn(208)](){const t=Wn;return this[t(223)][t(185)][t(220)](Fn)[t(193)][t(201)]}[Wn(182)](t){const e=Wn;for(const n of this[e(188)][e(180)]())for(const r of n)if(r.id===t)return r[e(225)]}[Wn(228)](t,e){const n=Wn,r=e?[this[n(188)][n(220)](e)]:this[n(188)][n(180)](),s=new Set;for(const e of r)for(const r of e)r[n(225)].id===t.id&&s[n(204)](r.id);return s}[Wn(213)](t){const e=Wn;for(const n of this[e(188)][e(180)]())for(const r of n)if(r[e(225)]===t)return r[e(198)]}[Wn(183)](t,e){const n=Wn;if(n(209)!==this[n(223)][n(185)][n(220)](Fn)[n(191)])return;const r=e[n(225)],s=this[n(192)][n(205)](r.id)||this[n(207)](r),o=Object[n(181)]({},e,{user:s});if(this[n(188)][n(220)](t)[n(204)](o),!r[n(219)]){const e=this[n(226)][n(220)](t);e[n(190)](s.id)||e[n(204)](s),this[n(206)][n(190)](s.id)||r[n(219)]||this[n(206)][n(204)](s,s[n(234)]?0:void 0)}this[n(196)](n(222)+t,{channelId:t,session:o})}[Wn(186)](t,e){const n=Wn;if(n(209)!==this[n(223)][n(185)][n(220)](Fn)[n(191)])return;const r=this[n(226)][n(220)](t),s=e[n(225)];s.id&&(this[n(188)][n(220)](t)[n(203)](e.id),r[n(190)](s.id)&&!this[n(228)](s,t)[n(237)]&&r[n(203)](s.id),this[n(206)][n(220)](s.id)&&!this[n(228)](s)[n(237)]&&this[n(206)][n(203)](s.id))}[Wn(207)](t,e){const n=Wn,r=this[n(192)][n(176)](t);return e&&this[n(192)][n(215)](t.id),r[n(229)]=this[n(197)]++,r}}var $n=__webpack_require__(6),tr=__webpack_require__.n($n),er=__webpack_require__(602),nr=__webpack_require__.n(er),rr=__webpack_require__(557),sr=__webpack_require__.n(rr),or=__webpack_require__(302),ir=__webpack_require__.n(or),ar=__webpack_require__(290),cr=__webpack_require__.n(ar),ur=__webpack_require__(117),dr={attributes:{"data-cke":!0}};dr.setAttributes=ir(),dr.insert=sr().bind(null,"head"),dr.domAPI=nr(),dr.insertStyleElement=cr();tr()(ur.A,dr);ur.A&&ur.A.locals&&ur.A.locals;const lr=hr;function pr(){const t=["name","fromRange","has","data-session-id","stopListening","_createdBatches","createElement","clear","oldRange","getSelectionClass","setCustomProperty","getRange","orderNumber","isObject","$graveyard","applyOperation","$text","add","updateMarker","false","ck-user__marker ","createRange","user:","contenteditable","highest","textContent","getPositions","markerRange","10dKjYqA","mouseleave","UserMarkers","schema","afterInit","undo","isSimilar","requires","getAttribute","9414szgjwp","checkChild","outerHTML","addEventListener","conversion","model","getUserBySessionId","user:position","isInline","end","editor","detach","split","setAttribute","element","user:range:","350wlniZJ","nodeAfter","getStart","keydown","ck-user__selection","render","startsWith","markerToHighlight","start","getMarkerClass","getContainedElement","size","editing","get","isLimit","getNearestSelectionRange","4231672efDmNo","pluginName","color","userPositionMarker","classList","ck-user__marker-tooltip","getFirstRange","createUserMarkerOperations","update:user:range","document","delete","change:range","1527760zVtRSK","toRange","markerName","isPremiumPlugin","ck-user__marker_hovered","358rvykkK","mapper","batch","root","tableCell","371prWjdy","rootName","destroy",'⁠<span class="ck-user__marker-line" contenteditable="false"><span class="ck-user__marker-dot"></span></span>',"remove","commands","selection","createUIElement","marker","newRange","100360zrCYWC","3360sDNeqz","Escape","user:position:","span","init","innerHTML","spellcheck","deletionPosition","markerNameToElements","getCustomProperty","user:range","hasDomSelection","parent","view","type","markers","toDomElement","editingDowncast","markerToElement","hasContent","removeClass","reconvertMarker","enqueueChange","mouseenter","4234722LKjZJg","change","set","plugins","addMarker","_domEmitter","listenTo","mySessionId","isCollapsed","3884760lLrzhz","isOfficialPlugin","for","removeMarker","isDocumentOperation"];return(pr=function(){return t})()}function hr(t,e){const n=pr();return(hr=function(t,e){return n[t-=356]})(t,e)}!function(t){const e=hr,n=t();for(;;)try{if(793877===-parseInt(e(430))/1+-parseInt(e(435))/2*(-parseInt(e(451))/3)+parseInt(e(418))/4+-parseInt(e(377))/5*(-parseInt(e(475))/6)+-parseInt(e(440))/7*(parseInt(e(450))/8)+-parseInt(e(386))/9*(parseInt(e(402))/10)+parseInt(e(484))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(pr);class fr extends e.Plugin{[lr(480)]=new((0,n.DomEmitterMixin)());static get[lr(384)](){return[Zn]}static get[lr(419)](){return lr(379)}static get[lr(485)](){return!0}static get[lr(433)](){return!0}[lr(455)](){const t=lr,e=this[t(396)],r=e[t(478)][t(415)](Zn);e[t(390)][t(486)](t(468))[t(469)]({model:t(393),view:(n,{writer:s})=>function(e,n,r,s){const o=t,i=e[o(432)][o(398)](":")[2],a=r[o(392)](i);if(!a||i===r[o(482)])return;if(!s[o(391)][o(380)][o(387)](e[o(376)][o(410)],o(365)))return;const c={class:o(369)+a[o(420)][o(411)](),"data-name":a[o(489)],"data-session-id":i},u=s[o(391)][o(466)][o(415)](e[o(432)])[o(404)](),d=u[o(403)],l=s[o(391)][o(380)];if(d&&l[o(362)](d)&&l[o(394)](d)&&!s[o(391)][o(466)][o(415)](o(401)+i)[o(360)]()[o(483)])return;const p=u[o(463)];return s[o(391)][o(380)][o(416)](p)&&!s[o(391)][o(470)](p)&&(c[o(372)]=!1),function(t,e,n){const r=o,s=t[r(447)](r(454),e);return t[r(359)](r(421),!0,s),s[r(407)]=function(t){const e=r,s=this[e(467)](t),o=document[e(495)](e(454));return o[e(422)][e(366)](e(423)),o[e(399)](e(372),e(368)),o[e(399)](e(457),e(368)),o[e(374)]=n[e(489)],s[e(456)]=e(443)+o[e(388)]+"⁠",s[e(389)](e(474),()=>{const t=e;s[t(422)][t(366)](t(434))}),s[e(389)](e(378),()=>{const t=e;s[t(422)][t(444)](t(434))}),s},s[r(383)]=function(t){const e=r;return!(!this[e(460)](e(421))||!t[e(460)](e(421))||this[e(385)](e(492))!=t[e(385)](e(492)))},s}(n,c,a)}(n,s,r,e)}),e[t(390)][t(486)](t(468))[t(409)]({model:t(461),view:e=>function(e,n){const r=t,s=e[r(432)][r(398)](":")[2];if(s===n[r(482)])return null;const o=n[r(392)](s);return o?{id:s,classes:[r(406),o[r(420)][r(358)]()],attributes:{"data-session-id":s},priority:2e3+o[r(361)]}:{id:s,classes:[]}}(e,r)}),function(e){const n=t,r=e[n(391)],o=new Map,i=e[n(478)][n(415)](Zn);r[n(466)].on(n(426),(t,a,c,u)=>{const d=n;if(!u&&o[d(415)](a[d(489)]))return o[d(415)](a[d(489)])[d(397)](),void o[d(428)](a[d(489)]);const l=a[d(489)][d(398)](":")[2];if(l===i[d(482)])return;const p=d(453)+l;r[d(466)][d(491)](p)&&e[d(414)][d(472)](p),a.on(d(429),(t,e,n)=>{const i=d;if(i(363)!=e[i(438)][i(441)]&&i(363)==a[i(360)]()[i(438)][i(441)]&&!o[i(491)](a[i(489)])){const t=r[i(380)][i(417)](n[i(458)]);if(t){const e=s.ModelLiveRange[i(490)](t);o[i(477)](a[i(489)],e),e.on(i(429),(t,n,s)=>{const c=i;if(c(363)==e[c(438)][c(441)]){const t=r[c(380)][c(417)](s[c(458)]);t?(e[c(410)]=t[c(410)],e[c(395)]=t[c(395)]):(o[c(428)](a[c(489)]),e[c(397)]())}})}}})}),r[n(427)].on(n(476),()=>{const t=n;o[t(413)]>0&&r[t(473)]({isUndoable:!1},e=>{const n=t;for(const[t,s]of o)n(363)==r[n(466)][n(415)](t)[n(360)]()[n(438)][n(441)]&&(mr(t[n(398)](":")[2],s[n(431)](),r,e),s[n(397)]());o[n(356)]()})})}(e),this[t(480)][t(481)](n.global[t(427)],t(405),(n,{key:r})=>{const s=t;s(452)===r&&function(t){const e=s;t[e(414)][e(464)][e(476)](n=>{const r=e;for(const e of t[r(391)][r(466)]){if(!e[r(489)][r(408)](r(393)))continue;const s=t[r(414)][r(436)][r(459)](e[r(489)]);if(s)for(const t of s)n[r(471)](r(434),t)}})}(e)},{useCapture:!0})}[lr(381)](){const t=lr,e=this[t(396)],n=e[t(445)][t(415)](t(382));n&&e[t(391)].on(t(364),(r,s)=>{const o=t,i=s[0];if(!i[o(488)])return;if(o(448)!=i[o(465)]||!i[o(489)][o(408)](o(371)))return;const a=i[o(437)];n[o(494)][o(491)](a)&&(i[o(449)]=i[o(357)]?e[o(391)][o(370)](i[o(357)][o(410)],i[o(357)][o(395)]):null)},{priority:t(373)})}[lr(442)](){const t=lr;return this[t(480)][t(493)](),super[t(442)]()}[lr(425)](){const t=lr,e=this[t(396)],n=e[t(391)][t(427)],r=e[t(478)][t(415)](Zn);e[t(391)][t(473)]({isUndoable:!1},s=>{const o=t,i=o(401)+r[o(482)],a=o(453)+r[o(482)],c=e[o(391)][o(466)][o(491)](i);e[o(414)][o(464)][o(462)]?mr(r[o(482)],n[o(446)][o(424)](),e[o(391)],s):c&&(s[o(487)](i),s[o(487)](a))})}}function mr(t,e,n,r){const s=lr,o=s(401)+t,i=s(453)+t,a=e[s(412)]();let c=e[s(410)];if(a&&a.is(s(400),s(439))){const t=function(t,e){const n=s;for(const r of t[n(375)]())if(e[n(380)][n(387)](r,n(365)))return r}(e,n);t&&(c=t,e=r[s(370)](c))}const u=r[s(370)](c);n[s(466)][s(491)](o)?(r[s(367)](o,{range:e}),r[s(367)](i,{range:u})):(r[s(479)](o,{range:e,usingOperation:!0}),r[s(479)](i,{range:u,usingOperation:!0}))}function gr(t,e,n){const r=t.t,s=t.t;switch(e){case"PENDING_ACTION_SENDING_DATA":return s({string:"Sending data to the server.",id:"PENDING_ACTION_SENDING_DATA"});case"The local document and server document differ and merging them can cause unexpected behavior. To not lose your content save it locally and refresh the editor.":return s("The local document and server document differ and merging them can cause unexpected behavior. To not lose your content save it locally and refresh the editor.");case"The document cannot be connected back to the server. To not lose your content save it locally and refresh the editor.":return s("The document cannot be connected back to the server. To not lose your content save it locally and refresh the editor.");case"The document details could not be taken during the reconnection. To not lose your content save it locally and refresh the editor.":return s("The document details could not be taken during the reconnection. To not lose your content save it locally and refresh the editor.");case"The last saved version of the document does not match the local version. To not lose your content save it locally and refresh the editor.":return s("The last saved version of the document does not match the local version. To not lose your content save it locally and refresh the editor.");case"Synchronization issue":return s("Synchronization issue");case"Connected users list dropdown menu":return s("Connected users list dropdown menu");case"Collapsed connected users list (press ENTER to open it)":return s("Collapsed connected users list (press ENTER to open it)");case"Connected users list":return s("Connected users list");case"PENDING_ACTION_REVISION_HISTORY":return r({string:"Unsaved change in revision history.",id:"PENDING_ACTION_REVISION_HISTORY"});case"CONNECTED_USERS":return s({string:"1 connected user (me)",plural:"%0 connected users",id:"CONNECTED_USERS"},n);default:return""}}function yr(){var t=["attributesBoolean: boolean{k:string} expected",".SplitOperation.graveyardPosition: object expected","oldValueBoolean: boolean expected","nodes: array expected","graveyardPosition.",".Element.children: array expected","48BWGPxJ","5801892DrdCxg","boolean","812772wKHVDA","shouldReceiveAttributes: boolean expected","rootGraveyard: boolean expected","attributesJson","attributesBoolean: object expected","nodes","name","splitPosition.","graveyardPosition","affectsData","object expected","/RenameOperation","oldName: string expected","rootName: string expected",".InsertOperation.nodes: array expected","constructor","fork","/InsertOperation","AttributeOperation","Element","uint32","arrays","splitPosition","targetPosition","hasOwnProperty","2878881zjzgBA","oldRange.","data: string expected","/MoveOperation","call","wasUndone: boolean expected","range.","bool","default","decodeDelimited","toJSONOptions","newValueJson: string expected","InsertOperation","length","newValueJson","position",".Element.children: object expected","affectsData: boolean expected","roots","11tkuuTq","oldValueBoolean",".Range.start: object expected",".MoveOperation.targetPosition: object expected","end.","Range","decode","prototype","rootMain: boolean expected","MergeOperation","skipType","1784007HegRNO","isString",".RenameOperation.position: object expected","getTypeUrl","isObject","oldRange","string","key","position.","children.","/AttributeOperation","insertionPosition.","sourcePosition.","start","oldValueJson","Writer","attributesBoolean","newRange","len","path: integer[] expected",".MarkerOperation.oldRange: object expected","isArray","wasUndone","verify","stickiness: string expected","nodes.","/SplitOperation","start.","emptyObject","name: string expected","oldName","insertionPosition","elementName: string expected","newValueBoolean","isAdd: boolean expected","newName: string expected",".Element.attributesBoolean: object expected","encode","rootName","/RootOperation","MoveOperation","howMany","SplitOperation","708724tKFmny","path","/Element","newValueBoolean: boolean expected","push","range","defaults","2xcsoru","83780cvDwox",".MoveOperation.sourcePosition: object expected","data",".Position.path: array expected","RootOperation","type.googleapis.com","7tPIHKK","sourcePosition","RootAttributeOperation","MarkerOperation",".MergeOperation.targetPosition: object expected",".InsertOperation.nodes: object expected","newRange.","objects",".InsertOperation.position: object expected","newName",".AttributeOperation.range: object expected",".MergeOperation.sourcePosition: object expected","/MergeOperation","/RootAttributeOperation",".SplitOperation.splitPosition: object expected","rootGraveyard","stickiness","fromObject",".MarkerOperation.newRange: object expected","Reader","toObject","path: array expected","rootMain","isInteger","howMany: integer expected","targetPosition.","children: array expected","RenameOperation","end","root","/Range","Position","shouldReceiveAttributes","create","/MarkerOperation","util","isAdd","27134810CyZGsO","object","ldelim","root: string expected","emptyArray","toJSON","/Position","keys",".SplitOperation.insertionPosition: object expected","key: string expected","children","pos","oldValueJson: string expected",".MergeOperation.graveyardPosition: object expected",".Range.end: object expected","encodeDelimited","attributesJson: string expected","elementName"];return(yr=function(){return t})()}function br(t,e){var n=yr();return(br=function(t,e){return n[t-=442]})(t,e)}!function(t){for(var e=br,n=t();;)try{if(602825===-parseInt(e(453))/1+parseInt(e(460))/2*(-parseInt(e(556))/3)+-parseInt(e(531))/4+-parseInt(e(461))/5+parseInt(e(529))/6*(parseInt(e(467))/7)+-parseInt(e(528))/8*(parseInt(e(586))/9)+-parseInt(e(504))/10*(-parseInt(e(575))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(yr);const Ir=(()=>{var t=br,e=u[t(486)],n=u[t(601)],r=u[t(502)],s=u[t(574)][t(564)]||(u[t(574)][t(564)]={});return s[t(549)]=function(){var o=t;function i(t){var e=br;if(t)for(var n=Object[e(511)](t),r=0;r<n[e(569)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(582)][o(458)]=null,i[o(582)][o(593)]="",i[o(582)][o(576)]=!1,i[o(582)][o(600)]="",i[o(582)][o(443)]=!1,i[o(582)][o(570)]="",i[o(582)][o(608)]=!1,i[o(500)]=function(t){return new i(t)},i[o(447)]=function(t,e){var r=o;return e||(e=n[r(500)]()),null!=t[r(458)]&&Object[r(555)][r(560)](t,r(458))&&s[r(580)][r(447)](t[r(458)],e[r(551)](10)[r(547)]())[r(506)](),null!=t[r(593)]&&Object[r(555)][r(560)](t,r(593))&&e[r(551)](18)[r(592)](t[r(593)]),null!=t[r(576)]&&Object[r(555)][r(560)](t,r(576))&&e[r(551)](24)[r(563)](t[r(576)]),null!=t[r(600)]&&Object[r(555)][r(560)](t,r(600))&&e[r(551)](34)[r(592)](t[r(600)]),null!=t[r(443)]&&Object[r(555)][r(560)](t,r(443))&&e[r(551)](40)[r(563)](t[r(443)]),null!=t[r(570)]&&Object[r(555)][r(560)](t,r(570))&&e[r(551)](50)[r(592)](t[r(570)]),null!=t[r(608)]&&Object[r(555)][r(560)](t,r(608))&&e[r(551)](56)[r(563)](t[r(608)]),e},i[o(519)]=function(t,e){var n=o;return this[n(447)](t,e)[n(506)]()},i[o(581)]=function(t,n){var r=o;t instanceof e||(t=e[r(500)](t));for(var i=void 0===n?t[r(604)]:t[r(515)]+n,a=new(s[r(549)]);t[r(515)]<i;){var c=t[r(551)]();switch(c>>>3){case 1:a[r(458)]=s[r(580)][r(581)](t,t[r(551)]());break;case 2:a[r(593)]=t[r(592)]();break;case 3:a[r(576)]=t[r(563)]();break;case 4:a[r(600)]=t[r(592)]();break;case 5:a[r(443)]=t[r(563)]();break;case 6:a[r(570)]=t[r(592)]();break;case 7:a[r(608)]=t[r(563)]();break;default:t[r(585)](7&c)}}return a},i[o(565)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(581)](t,t[n(551)]())},i[o(609)]=function(t){var e=o;if(e(505)!=typeof t||null===t)return e(541);if(null!=t[e(458)]&&t[e(555)](e(458))){var n=s[e(580)][e(609)](t[e(458)]);if(n)return e(562)+n}return null!=t[e(593)]&&t[e(555)](e(593))&&!r[e(587)](t[e(593)])?e(513):null!=t[e(576)]&&t[e(555)](e(576))&&e(530)!=typeof t[e(576)]?e(524):null!=t[e(600)]&&t[e(555)](e(600))&&!r[e(587)](t[e(600)])?e(516):null!=t[e(443)]&&t[e(555)](e(443))&&e(530)!=typeof t[e(443)]?e(456):null!=t[e(570)]&&t[e(555)](e(570))&&!r[e(587)](t[e(570)])?e(567):null!=t[e(608)]&&t[e(555)](e(608))&&e(530)!=typeof t[e(608)]?e(561):null},i[o(484)]=function(t){var e=o;if(t instanceof s[e(549)])return t;var n=new(s[e(549)]);if(null!=t[e(458)]){if(e(505)!=typeof t[e(458)])throw TypeError(e(477));n[e(458)]=s[e(580)][e(484)](t[e(458)])}return null!=t[e(593)]&&(n[e(593)]=String(t[e(593)])),null!=t[e(576)]&&(n[e(576)]=Boolean(t[e(576)])),null!=t[e(600)]&&(n[e(600)]=String(t[e(600)])),null!=t[e(443)]&&(n[e(443)]=Boolean(t[e(443)])),null!=t[e(570)]&&(n[e(570)]=String(t[e(570)])),null!=t[e(608)]&&(n[e(608)]=Boolean(t[e(608)])),n},i[o(487)]=function(t,e){var n=o;e||(e={});var r={};return e[n(459)]&&(r[n(458)]=null,r[n(593)]="",r[n(576)]=!1,r[n(600)]="",r[n(443)]=!1,r[n(570)]="",r[n(608)]=!1),null!=t[n(458)]&&t[n(555)](n(458))&&(r[n(458)]=s[n(580)][n(487)](t[n(458)],e)),null!=t[n(593)]&&t[n(555)](n(593))&&(r[n(593)]=t[n(593)]),null!=t[n(576)]&&t[n(555)](n(576))&&(r[n(576)]=t[n(576)]),null!=t[n(600)]&&t[n(555)](n(600))&&(r[n(600)]=t[n(600)]),null!=t[n(443)]&&t[n(555)](n(443))&&(r[n(443)]=t[n(443)]),null!=t[n(570)]&&t[n(555)](n(570))&&(r[n(570)]=t[n(570)]),null!=t[n(608)]&&t[n(555)](n(608))&&(r[n(608)]=t[n(608)]),r},i[o(582)][o(509)]=function(){var t=o;return this[t(546)][t(487)](this,u[t(502)][t(566)])},i[o(589)]=function(t){var e=o;return void 0===t&&(t=e(466)),t+e(596)},i}(),s[t(568)]=function(){var o=t;function i(t){var e=br;if(this[e(536)]=[],t)for(var n=Object[e(511)](t),r=0;r<n[e(569)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(582)][o(571)]=null,i[o(582)][o(536)]=r[o(508)],i[o(582)][o(499)]=!1,i[o(582)][o(608)]=!1,i[o(500)]=function(t){return new i(t)},i[o(447)]=function(t,e){var r=o;if(e||(e=n[r(500)]()),null!=t[r(571)]&&Object[r(555)][r(560)](t,r(571))&&s[r(498)][r(447)](t[r(571)],e[r(551)](10)[r(547)]())[r(506)](),null!=t[r(536)]&&t[r(536)][r(569)])for(var i=0;i<t[r(536)][r(569)];++i)s[r(550)][r(447)](t[r(536)][i],e[r(551)](18)[r(547)]())[r(506)]();return null!=t[r(499)]&&Object[r(555)][r(560)](t,r(499))&&e[r(551)](24)[r(563)](t[r(499)]),null!=t[r(608)]&&Object[r(555)][r(560)](t,r(608))&&e[r(551)](32)[r(563)](t[r(608)]),e},i[o(519)]=function(t,e){var n=o;return this[n(447)](t,e)[n(506)]()},i[o(581)]=function(t,n){var r=o;t instanceof e||(t=e[r(500)](t));for(var i=void 0===n?t[r(604)]:t[r(515)]+n,a=new(s[r(568)]);t[r(515)]<i;){var c=t[r(551)]();switch(c>>>3){case 1:a[r(571)]=s[r(498)][r(581)](t,t[r(551)]());break;case 2:a[r(536)]&&a[r(536)][r(569)]||(a[r(536)]=[]),a[r(536)][r(457)](s[r(550)][r(581)](t,t[r(551)]()));break;case 3:a[r(499)]=t[r(563)]();break;case 4:a[r(608)]=t[r(563)]();break;default:t[r(585)](7&c)}}return a},i[o(565)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(581)](t,t[n(551)]())},i[o(609)]=function(t){var e=o;if(e(505)!=typeof t||null===t)return e(541);if(null!=t[e(571)]&&t[e(555)](e(571))&&(r=s[e(498)][e(609)](t[e(571)])))return e(594)+r;if(null!=t[e(536)]&&t[e(555)](e(536))){if(!Array[e(607)](t[e(536)]))return e(525);for(var n=0;n<t[e(536)][e(569)];++n){var r;if(r=s[e(550)][e(609)](t[e(536)][n]))return e(611)+r}}return null!=t[e(499)]&&t[e(555)](e(499))&&e(530)!=typeof t[e(499)]?e(532):null!=t[e(608)]&&t[e(555)](e(608))&&e(530)!=typeof t[e(608)]?e(561):null},i[o(484)]=function(t){var e=o;if(t instanceof s[e(568)])return t;var n=new(s[e(568)]);if(null!=t[e(571)]){if(e(505)!=typeof t[e(571)])throw TypeError(e(475));n[e(571)]=s[e(498)][e(484)](t[e(571)])}if(t[e(536)]){if(!Array[e(607)](t[e(536)]))throw TypeError(e(545));n[e(536)]=[];for(var r=0;r<t[e(536)][e(569)];++r){if(e(505)!=typeof t[e(536)][r])throw TypeError(e(472));n[e(536)][r]=s[e(550)][e(484)](t[e(536)][r])}}return null!=t[e(499)]&&(n[e(499)]=Boolean(t[e(499)])),null!=t[e(608)]&&(n[e(608)]=Boolean(t[e(608)])),n},i[o(487)]=function(t,e){var n=o;e||(e={});var r={};if((e[n(552)]||e[n(459)])&&(r[n(536)]=[]),e[n(459)]&&(r[n(571)]=null,r[n(499)]=!1,r[n(608)]=!1),null!=t[n(571)]&&t[n(555)](n(571))&&(r[n(571)]=s[n(498)][n(487)](t[n(571)],e)),t[n(536)]&&t[n(536)][n(569)]){r[n(536)]=[];for(var i=0;i<t[n(536)][n(569)];++i)r[n(536)][i]=s[n(550)][n(487)](t[n(536)][i],e)}return null!=t[n(499)]&&t[n(555)](n(499))&&(r[n(499)]=t[n(499)]),null!=t[n(608)]&&t[n(555)](n(608))&&(r[n(608)]=t[n(608)]),r},i[o(582)][o(509)]=function(){var t=o;return this[t(546)][t(487)](this,u[t(502)][t(566)])},i[o(589)]=function(t){var e=o;return void 0===t&&(t=e(466)),t+e(548)},i}(),s[t(470)]=function(){var o=t;function i(t){var e=br;if(t)for(var n=Object[e(511)](t),r=0;r<n[e(569)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(582)][o(537)]="",i[o(582)][o(591)]=null,i[o(582)][o(603)]=null,i[o(582)][o(540)]=!1,i[o(582)][o(608)]=!1,i[o(500)]=function(t){return new i(t)},i[o(447)]=function(t,e){var r=o;return e||(e=n[r(500)]()),null!=t[r(537)]&&Object[r(555)][r(560)](t,r(537))&&e[r(551)](10)[r(592)](t[r(537)]),null!=t[r(591)]&&Object[r(555)][r(560)](t,r(591))&&s[r(580)][r(447)](t[r(591)],e[r(551)](18)[r(547)]())[r(506)](),null!=t[r(603)]&&Object[r(555)][r(560)](t,r(603))&&s[r(580)][r(447)](t[r(603)],e[r(551)](26)[r(547)]())[r(506)](),null!=t[r(540)]&&Object[r(555)][r(560)](t,r(540))&&e[r(551)](32)[r(563)](t[r(540)]),null!=t[r(608)]&&Object[r(555)][r(560)](t,r(608))&&e[r(551)](40)[r(563)](t[r(608)]),e},i[o(519)]=function(t,e){var n=o;return this[n(447)](t,e)[n(506)]()},i[o(581)]=function(t,n){var r=o;t instanceof e||(t=e[r(500)](t));for(var i=void 0===n?t[r(604)]:t[r(515)]+n,a=new(s[r(470)]);t[r(515)]<i;){var c=t[r(551)]();switch(c>>>3){case 1:a[r(537)]=t[r(592)]();break;case 2:a[r(591)]=s[r(580)][r(581)](t,t[r(551)]());break;case 3:a[r(603)]=s[r(580)][r(581)](t,t[r(551)]());break;case 4:a[r(540)]=t[r(563)]();break;case 5:a[r(608)]=t[r(563)]();break;default:t[r(585)](7&c)}}return a},i[o(565)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(581)](t,t[n(551)]())},i[o(609)]=function(t){var e,n=o;return n(505)!=typeof t||null===t?n(541):null!=t[n(537)]&&t[n(555)](n(537))&&!r[n(587)](t[n(537)])?n(615):null!=t[n(591)]&&t[n(555)](n(591))&&(e=s[n(580)][n(609)](t[n(591)]))?n(557)+e:null!=t[n(603)]&&t[n(555)](n(603))&&(e=s[n(580)][n(609)](t[n(603)]))?n(473)+e:null!=t[n(540)]&&t[n(555)](n(540))&&n(530)!=typeof t[n(540)]?n(573):null!=t[n(608)]&&t[n(555)](n(608))&&n(530)!=typeof t[n(608)]?n(561):null},i[o(484)]=function(t){var e=o;if(t instanceof s[e(470)])return t;var n=new(s[e(470)]);if(null!=t[e(537)]&&(n[e(537)]=String(t[e(537)])),null!=t[e(591)]){if(e(505)!=typeof t[e(591)])throw TypeError(e(606));n[e(591)]=s[e(580)][e(484)](t[e(591)])}if(null!=t[e(603)]){if(e(505)!=typeof t[e(603)])throw TypeError(e(485));n[e(603)]=s[e(580)][e(484)](t[e(603)])}return null!=t[e(540)]&&(n[e(540)]=Boolean(t[e(540)])),null!=t[e(608)]&&(n[e(608)]=Boolean(t[e(608)])),n},i[o(487)]=function(t,e){var n=o;e||(e={});var r={};return e[n(459)]&&(r[n(537)]="",r[n(591)]=null,r[n(603)]=null,r[n(540)]=!1,r[n(608)]=!1),null!=t[n(537)]&&t[n(555)](n(537))&&(r[n(537)]=t[n(537)]),null!=t[n(591)]&&t[n(555)](n(591))&&(r[n(591)]=s[n(580)][n(487)](t[n(591)],e)),null!=t[n(603)]&&t[n(555)](n(603))&&(r[n(603)]=s[n(580)][n(487)](t[n(603)],e)),null!=t[n(540)]&&t[n(555)](n(540))&&(r[n(540)]=t[n(540)]),null!=t[n(608)]&&t[n(555)](n(608))&&(r[n(608)]=t[n(608)]),r},i[o(582)][o(509)]=function(){var t=o;return this[t(546)][t(487)](this,u[t(502)][t(566)])},i[o(589)]=function(t){var e=o;return void 0===t&&(t=e(466)),t+e(501)},i}(),s[t(584)]=function(){var o=t;function i(t){var e=br;if(t)for(var n=Object[e(511)](t),r=0;r<n[e(569)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(582)][o(468)]=null,i[o(582)][o(554)]=null,i[o(582)][o(539)]=null,i[o(582)][o(451)]=0,i[o(582)][o(608)]=!1,i[o(500)]=function(t){return new i(t)},i[o(447)]=function(t,e){var r=o;return e||(e=n[r(500)]()),null!=t[r(468)]&&Object[r(555)][r(560)](t,r(468))&&s[r(498)][r(447)](t[r(468)],e[r(551)](10)[r(547)]())[r(506)](),null!=t[r(554)]&&Object[r(555)][r(560)](t,r(554))&&s[r(498)][r(447)](t[r(554)],e[r(551)](18)[r(547)]())[r(506)](),null!=t[r(539)]&&Object[r(555)][r(560)](t,r(539))&&s[r(498)][r(447)](t[r(539)],e[r(551)](26)[r(547)]())[r(506)](),null!=t[r(451)]&&Object[r(555)][r(560)](t,r(451))&&e[r(551)](32)[r(551)](t[r(451)]),null!=t[r(608)]&&Object[r(555)][r(560)](t,r(608))&&e[r(551)](40)[r(563)](t[r(608)]),e},i[o(519)]=function(t,e){var n=o;return this[n(447)](t,e)[n(506)]()},i[o(581)]=function(t,n){var r=o;t instanceof e||(t=e[r(500)](t));for(var i=void 0===n?t[r(604)]:t[r(515)]+n,a=new(s[r(584)]);t[r(515)]<i;){var c=t[r(551)]();switch(c>>>3){case 1:a[r(468)]=s[r(498)][r(581)](t,t[r(551)]());break;case 2:a[r(554)]=s[r(498)][r(581)](t,t[r(551)]());break;case 3:a[r(539)]=s[r(498)][r(581)](t,t[r(551)]());break;case 4:a[r(451)]=t[r(551)]();break;case 5:a[r(608)]=t[r(563)]();break;default:t[r(585)](7&c)}}return a},i[o(565)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(581)](t,t[n(551)]())},i[o(609)]=function(t){var e,n=o;return n(505)!=typeof t||null===t?n(541):null!=t[n(468)]&&t[n(555)](n(468))&&(e=s[n(498)][n(609)](t[n(468)]))?n(598)+e:null!=t[n(554)]&&t[n(555)](n(554))&&(e=s[n(498)][n(609)](t[n(554)]))?n(492)+e:null!=t[n(539)]&&t[n(555)](n(539))&&(e=s[n(498)][n(609)](t[n(539)]))?n(526)+e:null!=t[n(451)]&&t[n(555)](n(451))&&!r[n(490)](t[n(451)])?n(491):null!=t[n(608)]&&t[n(555)](n(608))&&n(530)!=typeof t[n(608)]?n(561):null},i[o(484)]=function(t){var e=o;if(t instanceof s[e(584)])return t;var n=new(s[e(584)]);if(null!=t[e(468)]){if(e(505)!=typeof t[e(468)])throw TypeError(e(478));n[e(468)]=s[e(498)][e(484)](t[e(468)])}if(null!=t[e(554)]){if(e(505)!=typeof t[e(554)])throw TypeError(e(471));n[e(554)]=s[e(498)][e(484)](t[e(554)])}if(null!=t[e(539)]){if(e(505)!=typeof t[e(539)])throw TypeError(e(517));n[e(539)]=s[e(498)][e(484)](t[e(539)])}return null!=t[e(451)]&&(n[e(451)]=t[e(451)]>>>0),null!=t[e(608)]&&(n[e(608)]=Boolean(t[e(608)])),n},i[o(487)]=function(t,e){var n=o;e||(e={});var r={};return e[n(459)]&&(r[n(468)]=null,r[n(554)]=null,r[n(539)]=null,r[n(451)]=0,r[n(608)]=!1),null!=t[n(468)]&&t[n(555)](n(468))&&(r[n(468)]=s[n(498)][n(487)](t[n(468)],e)),null!=t[n(554)]&&t[n(555)](n(554))&&(r[n(554)]=s[n(498)][n(487)](t[n(554)],e)),null!=t[n(539)]&&t[n(555)](n(539))&&(r[n(539)]=s[n(498)][n(487)](t[n(539)],e)),null!=t[n(451)]&&t[n(555)](n(451))&&(r[n(451)]=t[n(451)]),null!=t[n(608)]&&t[n(555)](n(608))&&(r[n(608)]=t[n(608)]),r},i[o(582)][o(509)]=function(){var t=o;return this[t(546)][t(487)](this,u[t(502)][t(566)])},i[o(589)]=function(t){var e=o;return void 0===t&&(t=e(466)),t+e(479)},i}(),s[t(450)]=function(){var o=t;function i(t){var e=br;if(t)for(var n=Object[e(511)](t),r=0;r<n[e(569)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(582)][o(468)]=null,i[o(582)][o(451)]=0,i[o(582)][o(554)]=null,i[o(582)][o(608)]=!1,i[o(500)]=function(t){return new i(t)},i[o(447)]=function(t,e){var r=o;return e||(e=n[r(500)]()),null!=t[r(468)]&&Object[r(555)][r(560)](t,r(468))&&s[r(498)][r(447)](t[r(468)],e[r(551)](10)[r(547)]())[r(506)](),null!=t[r(451)]&&Object[r(555)][r(560)](t,r(451))&&e[r(551)](16)[r(551)](t[r(451)]),null!=t[r(554)]&&Object[r(555)][r(560)](t,r(554))&&s[r(498)][r(447)](t[r(554)],e[r(551)](26)[r(547)]())[r(506)](),null!=t[r(608)]&&Object[r(555)][r(560)](t,r(608))&&e[r(551)](32)[r(563)](t[r(608)]),e},i[o(519)]=function(t,e){var n=o;return this[n(447)](t,e)[n(506)]()},i[o(581)]=function(t,n){var r=o;t instanceof e||(t=e[r(500)](t));for(var i=void 0===n?t[r(604)]:t[r(515)]+n,a=new(s[r(450)]);t[r(515)]<i;){var c=t[r(551)]();switch(c>>>3){case 1:a[r(468)]=s[r(498)][r(581)](t,t[r(551)]());break;case 2:a[r(451)]=t[r(551)]();break;case 3:a[r(554)]=s[r(498)][r(581)](t,t[r(551)]());break;case 4:a[r(608)]=t[r(563)]();break;default:t[r(585)](7&c)}}return a},i[o(565)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(581)](t,t[n(551)]())},i[o(609)]=function(t){var e,n=o;return n(505)!=typeof t||null===t?n(541):null!=t[n(468)]&&t[n(555)](n(468))&&(e=s[n(498)][n(609)](t[n(468)]))?n(598)+e:null!=t[n(451)]&&t[n(555)](n(451))&&!r[n(490)](t[n(451)])?n(491):null!=t[n(554)]&&t[n(555)](n(554))&&(e=s[n(498)][n(609)](t[n(554)]))?n(492)+e:null!=t[n(608)]&&t[n(555)](n(608))&&n(530)!=typeof t[n(608)]?n(561):null},i[o(484)]=function(t){var e=o;if(t instanceof s[e(450)])return t;var n=new(s[e(450)]);if(null!=t[e(468)]){if(e(505)!=typeof t[e(468)])throw TypeError(e(462));n[e(468)]=s[e(498)][e(484)](t[e(468)])}if(null!=t[e(451)]&&(n[e(451)]=t[e(451)]>>>0),null!=t[e(554)]){if(e(505)!=typeof t[e(554)])throw TypeError(e(578));n[e(554)]=s[e(498)][e(484)](t[e(554)])}return null!=t[e(608)]&&(n[e(608)]=Boolean(t[e(608)])),n},i[o(487)]=function(t,e){var n=o;e||(e={});var r={};return e[n(459)]&&(r[n(468)]=null,r[n(451)]=0,r[n(554)]=null,r[n(608)]=!1),null!=t[n(468)]&&t[n(555)](n(468))&&(r[n(468)]=s[n(498)][n(487)](t[n(468)],e)),null!=t[n(451)]&&t[n(555)](n(451))&&(r[n(451)]=t[n(451)]),null!=t[n(554)]&&t[n(555)](n(554))&&(r[n(554)]=s[n(498)][n(487)](t[n(554)],e)),null!=t[n(608)]&&t[n(555)](n(608))&&(r[n(608)]=t[n(608)]),r},i[o(582)][o(509)]=function(){var t=o;return this[t(546)][t(487)](this,u[t(502)][t(566)])},i[o(589)]=function(t){var e=o;return void 0===t&&(t=e(466)),t+e(559)},i}(),s[t(494)]=function(){var o=t;function i(t){var e=br;if(t)for(var n=Object[e(511)](t),r=0;r<n[e(569)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(582)][o(571)]=null,i[o(582)][o(616)]="",i[o(582)][o(476)]="",i[o(582)][o(608)]=!1,i[o(500)]=function(t){return new i(t)},i[o(447)]=function(t,e){var r=o;return e||(e=n[r(500)]()),null!=t[r(571)]&&Object[r(555)][r(560)](t,r(571))&&s[r(498)][r(447)](t[r(571)],e[r(551)](10)[r(547)]())[r(506)](),null!=t[r(616)]&&Object[r(555)][r(560)](t,r(616))&&e[r(551)](18)[r(592)](t[r(616)]),null!=t[r(476)]&&Object[r(555)][r(560)](t,r(476))&&e[r(551)](26)[r(592)](t[r(476)]),null!=t[r(608)]&&Object[r(555)][r(560)](t,r(608))&&e[r(551)](32)[r(563)](t[r(608)]),e},i[o(519)]=function(t,e){var n=o;return this[n(447)](t,e)[n(506)]()},i[o(581)]=function(t,n){var r=o;t instanceof e||(t=e[r(500)](t));for(var i=void 0===n?t[r(604)]:t[r(515)]+n,a=new(s[r(494)]);t[r(515)]<i;){var c=t[r(551)]();switch(c>>>3){case 1:a[r(571)]=s[r(498)][r(581)](t,t[r(551)]());break;case 2:a[r(616)]=t[r(592)]();break;case 3:a[r(476)]=t[r(592)]();break;case 4:a[r(608)]=t[r(563)]();break;default:t[r(585)](7&c)}}return a},i[o(565)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(581)](t,t[n(551)]())},i[o(609)]=function(t){var e=o;if(e(505)!=typeof t||null===t)return e(541);if(null!=t[e(571)]&&t[e(555)](e(571))){var n=s[e(498)][e(609)](t[e(571)]);if(n)return e(594)+n}return null!=t[e(616)]&&t[e(555)](e(616))&&!r[e(587)](t[e(616)])?e(543):null!=t[e(476)]&&t[e(555)](e(476))&&!r[e(587)](t[e(476)])?e(445):null!=t[e(608)]&&t[e(555)](e(608))&&e(530)!=typeof t[e(608)]?e(561):null},i[o(484)]=function(t){var e=o;if(t instanceof s[e(494)])return t;var n=new(s[e(494)]);if(null!=t[e(571)]){if(e(505)!=typeof t[e(571)])throw TypeError(e(588));n[e(571)]=s[e(498)][e(484)](t[e(571)])}return null!=t[e(616)]&&(n[e(616)]=String(t[e(616)])),null!=t[e(476)]&&(n[e(476)]=String(t[e(476)])),null!=t[e(608)]&&(n[e(608)]=Boolean(t[e(608)])),n},i[o(487)]=function(t,e){var n=o;e||(e={});var r={};return e[n(459)]&&(r[n(571)]=null,r[n(616)]="",r[n(476)]="",r[n(608)]=!1),null!=t[n(571)]&&t[n(555)](n(571))&&(r[n(571)]=s[n(498)][n(487)](t[n(571)],e)),null!=t[n(616)]&&t[n(555)](n(616))&&(r[n(616)]=t[n(616)]),null!=t[n(476)]&&t[n(555)](n(476))&&(r[n(476)]=t[n(476)]),null!=t[n(608)]&&t[n(555)](n(608))&&(r[n(608)]=t[n(608)]),r},i[o(582)][o(509)]=function(){var t=o;return this[t(546)][t(487)](this,u[t(502)][t(566)])},i[o(589)]=function(t){var e=o;return void 0===t&&(t=e(466)),t+e(542)},i}(),s[t(469)]=function(){var o=t;function i(t){var e=br;if(t)for(var n=Object[e(511)](t),r=0;r<n[e(569)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(582)][o(496)]="",i[o(582)][o(593)]="",i[o(582)][o(576)]=!1,i[o(582)][o(600)]="",i[o(582)][o(443)]=!1,i[o(582)][o(570)]="",i[o(582)][o(608)]=!1,i[o(500)]=function(t){return new i(t)},i[o(447)]=function(t,e){var r=o;return e||(e=n[r(500)]()),null!=t[r(496)]&&Object[r(555)][r(560)](t,r(496))&&e[r(551)](10)[r(592)](t[r(496)]),null!=t[r(593)]&&Object[r(555)][r(560)](t,r(593))&&e[r(551)](18)[r(592)](t[r(593)]),null!=t[r(576)]&&Object[r(555)][r(560)](t,r(576))&&e[r(551)](24)[r(563)](t[r(576)]),null!=t[r(600)]&&Object[r(555)][r(560)](t,r(600))&&e[r(551)](34)[r(592)](t[r(600)]),null!=t[r(443)]&&Object[r(555)][r(560)](t,r(443))&&e[r(551)](40)[r(563)](t[r(443)]),null!=t[r(570)]&&Object[r(555)][r(560)](t,r(570))&&e[r(551)](50)[r(592)](t[r(570)]),null!=t[r(608)]&&Object[r(555)][r(560)](t,r(608))&&e[r(551)](56)[r(563)](t[r(608)]),e},i[o(519)]=function(t,e){var n=o;return this[n(447)](t,e)[n(506)]()},i[o(581)]=function(t,n){var r=o;t instanceof e||(t=e[r(500)](t));for(var i=void 0===n?t[r(604)]:t[r(515)]+n,a=new(s[r(469)]);t[r(515)]<i;){var c=t[r(551)]();switch(c>>>3){case 1:a[r(496)]=t[r(592)]();break;case 2:a[r(593)]=t[r(592)]();break;case 3:a[r(576)]=t[r(563)]();break;case 4:a[r(600)]=t[r(592)]();break;case 5:a[r(443)]=t[r(563)]();break;case 6:a[r(570)]=t[r(592)]();break;case 7:a[r(608)]=t[r(563)]();break;default:t[r(585)](7&c)}}return a},i[o(565)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(581)](t,t[n(551)]())},i[o(609)]=function(t){var e=o;return e(505)!=typeof t||null===t?e(541):null!=t[e(496)]&&t[e(555)](e(496))&&!r[e(587)](t[e(496)])?e(507):null!=t[e(593)]&&t[e(555)](e(593))&&!r[e(587)](t[e(593)])?e(513):null!=t[e(576)]&&t[e(555)](e(576))&&e(530)!=typeof t[e(576)]?e(524):null!=t[e(600)]&&t[e(555)](e(600))&&!r[e(587)](t[e(600)])?e(516):null!=t[e(443)]&&t[e(555)](e(443))&&e(530)!=typeof t[e(443)]?e(456):null!=t[e(570)]&&t[e(555)](e(570))&&!r[e(587)](t[e(570)])?e(567):null!=t[e(608)]&&t[e(555)](e(608))&&e(530)!=typeof t[e(608)]?e(561):null},i[o(484)]=function(t){var e=o;if(t instanceof s[e(469)])return t;var n=new(s[e(469)]);return null!=t[e(496)]&&(n[e(496)]=String(t[e(496)])),null!=t[e(593)]&&(n[e(593)]=String(t[e(593)])),null!=t[e(576)]&&(n[e(576)]=Boolean(t[e(576)])),null!=t[e(600)]&&(n[e(600)]=String(t[e(600)])),null!=t[e(443)]&&(n[e(443)]=Boolean(t[e(443)])),null!=t[e(570)]&&(n[e(570)]=String(t[e(570)])),null!=t[e(608)]&&(n[e(608)]=Boolean(t[e(608)])),n},i[o(487)]=function(t,e){var n=o;e||(e={});var r={};return e[n(459)]&&(r[n(496)]="",r[n(593)]="",r[n(576)]=!1,r[n(600)]="",r[n(443)]=!1,r[n(570)]="",r[n(608)]=!1),null!=t[n(496)]&&t[n(555)](n(496))&&(r[n(496)]=t[n(496)]),null!=t[n(593)]&&t[n(555)](n(593))&&(r[n(593)]=t[n(593)]),null!=t[n(576)]&&t[n(555)](n(576))&&(r[n(576)]=t[n(576)]),null!=t[n(600)]&&t[n(555)](n(600))&&(r[n(600)]=t[n(600)]),null!=t[n(443)]&&t[n(555)](n(443))&&(r[n(443)]=t[n(443)]),null!=t[n(570)]&&t[n(555)](n(570))&&(r[n(570)]=t[n(570)]),null!=t[n(608)]&&t[n(555)](n(608))&&(r[n(608)]=t[n(608)]),r},i[o(582)][o(509)]=function(){var t=o;return this[t(546)][t(487)](this,u[t(502)][t(566)])},i[o(589)]=function(t){var e=o;return void 0===t&&(t=e(466)),t+e(480)},i}(),s[t(465)]=function(){var o=t;function i(t){var e=br;if(t)for(var n=Object[e(511)](t),r=0;r<n[e(569)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(582)][o(448)]="",i[o(582)][o(521)]="",i[o(582)][o(503)]=!1,i[o(582)][o(608)]=!1,i[o(500)]=function(t){return new i(t)},i[o(447)]=function(t,e){var r=o;return e||(e=n[r(500)]()),null!=t[r(448)]&&Object[r(555)][r(560)](t,r(448))&&e[r(551)](10)[r(592)](t[r(448)]),null!=t[r(521)]&&Object[r(555)][r(560)](t,r(521))&&e[r(551)](18)[r(592)](t[r(521)]),null!=t[r(503)]&&Object[r(555)][r(560)](t,r(503))&&e[r(551)](24)[r(563)](t[r(503)]),null!=t[r(608)]&&Object[r(555)][r(560)](t,r(608))&&e[r(551)](32)[r(563)](t[r(608)]),e},i[o(519)]=function(t,e){var n=o;return this[n(447)](t,e)[n(506)]()},i[o(581)]=function(t,n){var r=o;t instanceof e||(t=e[r(500)](t));for(var i=void 0===n?t[r(604)]:t[r(515)]+n,a=new(s[r(465)]);t[r(515)]<i;){var c=t[r(551)]();switch(c>>>3){case 1:a[r(448)]=t[r(592)]();break;case 2:a[r(521)]=t[r(592)]();break;case 3:a[r(503)]=t[r(563)]();break;case 4:a[r(608)]=t[r(563)]();break;default:t[r(585)](7&c)}}return a},i[o(565)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(581)](t,t[n(551)]())},i[o(609)]=function(t){var e=o;return e(505)!=typeof t||null===t?e(541):null!=t[e(448)]&&t[e(555)](e(448))&&!r[e(587)](t[e(448)])?e(544):null!=t[e(521)]&&t[e(555)](e(521))&&!r[e(587)](t[e(521)])?e(442):null!=t[e(503)]&&t[e(555)](e(503))&&e(530)!=typeof t[e(503)]?e(444):null!=t[e(608)]&&t[e(555)](e(608))&&e(530)!=typeof t[e(608)]?e(561):null},i[o(484)]=function(t){var e=o;if(t instanceof s[e(465)])return t;var n=new(s[e(465)]);return null!=t[e(448)]&&(n[e(448)]=String(t[e(448)])),null!=t[e(521)]&&(n[e(521)]=String(t[e(521)])),null!=t[e(503)]&&(n[e(503)]=Boolean(t[e(503)])),null!=t[e(608)]&&(n[e(608)]=Boolean(t[e(608)])),n},i[o(487)]=function(t,e){var n=o;e||(e={});var r={};return e[n(459)]&&(r[n(448)]="",r[n(521)]="",r[n(503)]=!1,r[n(608)]=!1),null!=t[n(448)]&&t[n(555)](n(448))&&(r[n(448)]=t[n(448)]),null!=t[n(521)]&&t[n(555)](n(521))&&(r[n(521)]=t[n(521)]),null!=t[n(503)]&&t[n(555)](n(503))&&(r[n(503)]=t[n(503)]),null!=t[n(608)]&&t[n(555)](n(608))&&(r[n(608)]=t[n(608)]),r},i[o(582)][o(509)]=function(){var t=o;return this[t(546)][t(487)](this,u[t(502)][t(566)])},i[o(589)]=function(t){var e=o;return void 0===t&&(t=e(466)),t+e(449)},i}(),s[t(452)]=function(){var o=t;function i(t){var e=br;if(t)for(var n=Object[e(511)](t),r=0;r<n[e(569)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(582)][o(553)]=null,i[o(582)][o(539)]=null,i[o(582)][o(451)]=0,i[o(582)][o(617)]=null,i[o(582)][o(608)]=!1,i[o(500)]=function(t){return new i(t)},i[o(447)]=function(t,e){var r=o;return e||(e=n[r(500)]()),null!=t[r(553)]&&Object[r(555)][r(560)](t,r(553))&&s[r(498)][r(447)](t[r(553)],e[r(551)](10)[r(547)]())[r(506)](),null!=t[r(539)]&&Object[r(555)][r(560)](t,r(539))&&s[r(498)][r(447)](t[r(539)],e[r(551)](18)[r(547)]())[r(506)](),null!=t[r(451)]&&Object[r(555)][r(560)](t,r(451))&&e[r(551)](24)[r(551)](t[r(451)]),null!=t[r(617)]&&Object[r(555)][r(560)](t,r(617))&&s[r(498)][r(447)](t[r(617)],e[r(551)](34)[r(547)]())[r(506)](),null!=t[r(608)]&&Object[r(555)][r(560)](t,r(608))&&e[r(551)](40)[r(563)](t[r(608)]),e},i[o(519)]=function(t,e){var n=o;return this[n(447)](t,e)[n(506)]()},i[o(581)]=function(t,n){var r=o;t instanceof e||(t=e[r(500)](t));for(var i=void 0===n?t[r(604)]:t[r(515)]+n,a=new(s[r(452)]);t[r(515)]<i;){var c=t[r(551)]();switch(c>>>3){case 1:a[r(553)]=s[r(498)][r(581)](t,t[r(551)]());break;case 2:a[r(539)]=s[r(498)][r(581)](t,t[r(551)]());break;case 3:a[r(451)]=t[r(551)]();break;case 4:a[r(617)]=s[r(498)][r(581)](t,t[r(551)]());break;case 5:a[r(608)]=t[r(563)]();break;default:t[r(585)](7&c)}}return a},i[o(565)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(581)](t,t[n(551)]())},i[o(609)]=function(t){var e,n=o;return n(505)!=typeof t||null===t?n(541):null!=t[n(553)]&&t[n(555)](n(553))&&(e=s[n(498)][n(609)](t[n(553)]))?n(538)+e:null!=t[n(539)]&&t[n(555)](n(539))&&(e=s[n(498)][n(609)](t[n(539)]))?n(526)+e:null!=t[n(451)]&&t[n(555)](n(451))&&!r[n(490)](t[n(451)])?n(491):null!=t[n(617)]&&t[n(555)](n(617))&&(e=s[n(498)][n(609)](t[n(617)]))?n(597)+e:null!=t[n(608)]&&t[n(555)](n(608))&&n(530)!=typeof t[n(608)]?n(561):null},i[o(484)]=function(t){var e=o;if(t instanceof s[e(452)])return t;var n=new(s[e(452)]);if(null!=t[e(553)]){if(e(505)!=typeof t[e(553)])throw TypeError(e(481));n[e(553)]=s[e(498)][e(484)](t[e(553)])}if(null!=t[e(539)]){if(e(505)!=typeof t[e(539)])throw TypeError(e(523));n[e(539)]=s[e(498)][e(484)](t[e(539)])}if(null!=t[e(451)]&&(n[e(451)]=t[e(451)]>>>0),null!=t[e(617)]){if(e(505)!=typeof t[e(617)])throw TypeError(e(512));n[e(617)]=s[e(498)][e(484)](t[e(617)])}return null!=t[e(608)]&&(n[e(608)]=Boolean(t[e(608)])),n},i[o(487)]=function(t,e){var n=o;e||(e={});var r={};return e[n(459)]&&(r[n(553)]=null,r[n(539)]=null,r[n(451)]=0,r[n(617)]=null,r[n(608)]=!1),null!=t[n(553)]&&t[n(555)](n(553))&&(r[n(553)]=s[n(498)][n(487)](t[n(553)],e)),null!=t[n(539)]&&t[n(555)](n(539))&&(r[n(539)]=s[n(498)][n(487)](t[n(539)],e)),null!=t[n(451)]&&t[n(555)](n(451))&&(r[n(451)]=t[n(451)]),null!=t[n(617)]&&t[n(555)](n(617))&&(r[n(617)]=s[n(498)][n(487)](t[n(617)],e)),null!=t[n(608)]&&t[n(555)](n(608))&&(r[n(608)]=t[n(608)]),r},i[o(582)][o(509)]=function(){var t=o;return this[t(546)][t(487)](this,u[t(502)][t(566)])},i[o(589)]=function(t){var e=o;return void 0===t&&(t=e(466)),t+e(612)},i}(),s[t(498)]=function(){var o=t;function i(t){var e=br;if(this[e(454)]=[],t)for(var n=Object[e(511)](t),r=0;r<n[e(569)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(582)][o(496)]="",i[o(582)][o(489)]=!1,i[o(582)][o(482)]=!1,i[o(582)][o(454)]=r[o(508)],i[o(582)][o(483)]="",i[o(500)]=function(t){return new i(t)},i[o(447)]=function(t,e){var r=o;if(e||(e=n[r(500)]()),null!=t[r(496)]&&Object[r(555)][r(560)](t,r(496))&&e[r(551)](10)[r(592)](t[r(496)]),null!=t[r(489)]&&Object[r(555)][r(560)](t,r(489))&&e[r(551)](16)[r(563)](t[r(489)]),null!=t[r(482)]&&Object[r(555)][r(560)](t,r(482))&&e[r(551)](24)[r(563)](t[r(482)]),null!=t[r(454)]&&t[r(454)][r(569)]){e[r(551)](34)[r(547)]();for(var s=0;s<t[r(454)][r(569)];++s)e[r(551)](t[r(454)][s]);e[r(506)]()}return null!=t[r(483)]&&Object[r(555)][r(560)](t,r(483))&&e[r(551)](42)[r(592)](t[r(483)]),e},i[o(519)]=function(t,e){var n=o;return this[n(447)](t,e)[n(506)]()},i[o(581)]=function(t,n){var r=o;t instanceof e||(t=e[r(500)](t));for(var i=void 0===n?t[r(604)]:t[r(515)]+n,a=new(s[r(498)]);t[r(515)]<i;){var c=t[r(551)]();switch(c>>>3){case 1:a[r(496)]=t[r(592)]();break;case 2:a[r(489)]=t[r(563)]();break;case 3:a[r(482)]=t[r(563)]();break;case 4:if(a[r(454)]&&a[r(454)][r(569)]||(a[r(454)]=[]),2==(7&c))for(var u=t[r(551)]()+t[r(515)];t[r(515)]<u;)a[r(454)][r(457)](t[r(551)]());else a[r(454)][r(457)](t[r(551)]());break;case 5:a[r(483)]=t[r(592)]();break;default:t[r(585)](7&c)}}return a},i[o(565)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(581)](t,t[n(551)]())},i[o(609)]=function(t){var e=o;if(e(505)!=typeof t||null===t)return e(541);if(null!=t[e(496)]&&t[e(555)](e(496))&&!r[e(587)](t[e(496)]))return e(507);if(null!=t[e(489)]&&t[e(555)](e(489))&&e(530)!=typeof t[e(489)])return e(583);if(null!=t[e(482)]&&t[e(555)](e(482))&&e(530)!=typeof t[e(482)])return e(533);if(null!=t[e(454)]&&t[e(555)](e(454))){if(!Array[e(607)](t[e(454)]))return e(488);for(var n=0;n<t[e(454)][e(569)];++n)if(!r[e(490)](t[e(454)][n]))return e(605)}return null!=t[e(483)]&&t[e(555)](e(483))&&!r[e(587)](t[e(483)])?e(610):null},i[o(484)]=function(t){var e=o;if(t instanceof s[e(498)])return t;var n=new(s[e(498)]);if(null!=t[e(496)]&&(n[e(496)]=String(t[e(496)])),null!=t[e(489)]&&(n[e(489)]=Boolean(t[e(489)])),null!=t[e(482)]&&(n[e(482)]=Boolean(t[e(482)])),t[e(454)]){if(!Array[e(607)](t[e(454)]))throw TypeError(e(464));n[e(454)]=[];for(var r=0;r<t[e(454)][e(569)];++r)n[e(454)][r]=t[e(454)][r]>>>0}return null!=t[e(483)]&&(n[e(483)]=String(t[e(483)])),n},i[o(487)]=function(t,e){var n=o;e||(e={});var r={};if((e[n(552)]||e[n(459)])&&(r[n(454)]=[]),e[n(459)]&&(r[n(496)]="",r[n(489)]=!1,r[n(482)]=!1,r[n(483)]=""),null!=t[n(496)]&&t[n(555)](n(496))&&(r[n(496)]=t[n(496)]),null!=t[n(489)]&&t[n(555)](n(489))&&(r[n(489)]=t[n(489)]),null!=t[n(482)]&&t[n(555)](n(482))&&(r[n(482)]=t[n(482)]),t[n(454)]&&t[n(454)][n(569)]){r[n(454)]=[];for(var s=0;s<t[n(454)][n(569)];++s)r[n(454)][s]=t[n(454)][s]}return null!=t[n(483)]&&t[n(555)](n(483))&&(r[n(483)]=t[n(483)]),r},i[o(582)][o(509)]=function(){var t=o;return this[t(546)][t(487)](this,u[t(502)][t(566)])},i[o(589)]=function(t){var e=o;return void 0===t&&(t=e(466)),t+e(510)},i}(),s[t(580)]=function(){var r=t;function o(t){var e=br;if(t)for(var n=Object[e(511)](t),r=0;r<n[e(569)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return o[r(582)][r(599)]=null,o[r(582)][r(495)]=null,o[r(500)]=function(t){return new o(t)},o[r(447)]=function(t,e){var o=r;return e||(e=n[o(500)]()),null!=t[o(599)]&&Object[o(555)][o(560)](t,o(599))&&s[o(498)][o(447)](t[o(599)],e[o(551)](10)[o(547)]())[o(506)](),null!=t[o(495)]&&Object[o(555)][o(560)](t,o(495))&&s[o(498)][o(447)](t[o(495)],e[o(551)](18)[o(547)]())[o(506)](),e},o[r(519)]=function(t,e){var n=r;return this[n(447)](t,e)[n(506)]()},o[r(581)]=function(t,n){var o=r;t instanceof e||(t=e[o(500)](t));for(var i=void 0===n?t[o(604)]:t[o(515)]+n,a=new(s[o(580)]);t[o(515)]<i;){var c=t[o(551)]();switch(c>>>3){case 1:a[o(599)]=s[o(498)][o(581)](t,t[o(551)]());break;case 2:a[o(495)]=s[o(498)][o(581)](t,t[o(551)]());break;default:t[o(585)](7&c)}}return a},o[r(565)]=function(t){var n=r;return t instanceof e||(t=new e(t)),this[n(581)](t,t[n(551)]())},o[r(609)]=function(t){var e,n=r;return n(505)!=typeof t||null===t?n(541):null!=t[n(599)]&&t[n(555)](n(599))&&(e=s[n(498)][n(609)](t[n(599)]))?n(613)+e:null!=t[n(495)]&&t[n(555)](n(495))&&(e=s[n(498)][n(609)](t[n(495)]))?n(579)+e:null},o[r(484)]=function(t){var e=r;if(t instanceof s[e(580)])return t;var n=new(s[e(580)]);if(null!=t[e(599)]){if(e(505)!=typeof t[e(599)])throw TypeError(e(577));n[e(599)]=s[e(498)][e(484)](t[e(599)])}if(null!=t[e(495)]){if(e(505)!=typeof t[e(495)])throw TypeError(e(518));n[e(495)]=s[e(498)][e(484)](t[e(495)])}return n},o[r(487)]=function(t,e){var n=r;e||(e={});var o={};return e[n(459)]&&(o[n(599)]=null,o[n(495)]=null),null!=t[n(599)]&&t[n(555)](n(599))&&(o[n(599)]=s[n(498)][n(487)](t[n(599)],e)),null!=t[n(495)]&&t[n(555)](n(495))&&(o[n(495)]=s[n(498)][n(487)](t[n(495)],e)),o},o[r(582)][r(509)]=function(){var t=r;return this[t(546)][t(487)](this,u[t(502)][t(566)])},o[r(589)]=function(t){var e=r;return void 0===t&&(t=e(466)),t+e(497)},o}(),s[t(550)]=function(){var o=t;function i(t){var e=br;if(this[e(514)]=[],this[e(602)]={},t)for(var n=Object[e(511)](t),r=0;r<n[e(569)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(582)][o(537)]="",i[o(582)][o(514)]=r[o(508)],i[o(582)][o(463)]="",i[o(582)][o(602)]=r[o(614)],i[o(582)][o(534)]="",i[o(500)]=function(t){return new i(t)},i[o(447)]=function(t,e){var r=o;if(e||(e=n[r(500)]()),null!=t[r(537)]&&Object[r(555)][r(560)](t,r(537))&&e[r(551)](10)[r(592)](t[r(537)]),null!=t[r(514)]&&t[r(514)][r(569)])for(var i=0;i<t[r(514)][r(569)];++i)s[r(550)][r(447)](t[r(514)][i],e[r(551)](18)[r(547)]())[r(506)]();if(null!=t[r(463)]&&Object[r(555)][r(560)](t,r(463))&&e[r(551)](26)[r(592)](t[r(463)]),null!=t[r(602)]&&Object[r(555)][r(560)](t,r(602))){var a=Object[r(511)](t[r(602)]);for(i=0;i<a[r(569)];++i)e[r(551)](34)[r(547)]()[r(551)](10)[r(592)](a[i])[r(551)](16)[r(563)](t[r(602)][a[i]])[r(506)]()}return null!=t[r(534)]&&Object[r(555)][r(560)](t,r(534))&&e[r(551)](42)[r(592)](t[r(534)]),e},i[o(519)]=function(t,e){var n=o;return this[n(447)](t,e)[n(506)]()},i[o(581)]=function(t,n){var i=o;t instanceof e||(t=e[i(500)](t));for(var a,c,u=void 0===n?t[i(604)]:t[i(515)]+n,d=new(s[i(550)]);t[i(515)]<u;){var l=t[i(551)]();switch(l>>>3){case 1:d[i(537)]=t[i(592)]();break;case 2:d[i(514)]&&d[i(514)][i(569)]||(d[i(514)]=[]),d[i(514)][i(457)](s[i(550)][i(581)](t,t[i(551)]()));break;case 3:d[i(463)]=t[i(592)]();break;case 4:d[i(602)]===r[i(614)]&&(d[i(602)]={});var p=t[i(551)]()+t[i(515)];for(a="",c=!1;t[i(515)]<p;){var h=t[i(551)]();switch(h>>>3){case 1:a=t[i(592)]();break;case 2:c=t[i(563)]();break;default:t[i(585)](7&h)}}d[i(602)][a]=c;break;case 5:d[i(534)]=t[i(592)]();break;default:t[i(585)](7&l)}}return d},i[o(565)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(581)](t,t[n(551)]())},i[o(609)]=function(t){var e=o;if(e(505)!=typeof t||null===t)return e(541);if(null!=t[e(537)]&&t[e(555)](e(537))&&!r[e(587)](t[e(537)]))return e(615);if(null!=t[e(514)]&&t[e(555)](e(514))){if(!Array[e(607)](t[e(514)]))return e(493);for(var n=0;n<t[e(514)][e(569)];++n){var i=s[e(550)][e(609)](t[e(514)][n]);if(i)return e(595)+i}}if(null!=t[e(463)]&&t[e(555)](e(463))&&!r[e(587)](t[e(463)]))return e(558);if(null!=t[e(602)]&&t[e(555)](e(602))){if(!r[e(590)](t[e(602)]))return e(535);var a=Object[e(511)](t[e(602)]);for(n=0;n<a[e(569)];++n)if(e(530)!=typeof t[e(602)][a[n]])return e(522)}return null!=t[e(534)]&&t[e(555)](e(534))&&!r[e(587)](t[e(534)])?e(520):null},i[o(484)]=function(t){var e=o;if(t instanceof s[e(550)])return t;var n=new(s[e(550)]);if(null!=t[e(537)]&&(n[e(537)]=String(t[e(537)])),t[e(514)]){if(!Array[e(607)](t[e(514)]))throw TypeError(e(527));n[e(514)]=[];for(var r=0;r<t[e(514)][e(569)];++r){if(e(505)!=typeof t[e(514)][r])throw TypeError(e(572));n[e(514)][r]=s[e(550)][e(484)](t[e(514)][r])}}if(null!=t[e(463)]&&(n[e(463)]=String(t[e(463)])),t[e(602)]){if(e(505)!=typeof t[e(602)])throw TypeError(e(446));n[e(602)]={};var i=Object[e(511)](t[e(602)]);for(r=0;r<i[e(569)];++r)n[e(602)][i[r]]=Boolean(t[e(602)][i[r]])}return null!=t[e(534)]&&(n[e(534)]=String(t[e(534)])),n},i[o(487)]=function(t,e){var n=o;e||(e={});var r,i={};if((e[n(552)]||e[n(459)])&&(i[n(514)]=[]),(e[n(474)]||e[n(459)])&&(i[n(602)]={}),e[n(459)]&&(i[n(537)]="",i[n(463)]="",i[n(534)]=""),null!=t[n(537)]&&t[n(555)](n(537))&&(i[n(537)]=t[n(537)]),t[n(514)]&&t[n(514)][n(569)]){i[n(514)]=[];for(var a=0;a<t[n(514)][n(569)];++a)i[n(514)][a]=s[n(550)][n(487)](t[n(514)][a],e)}if(null!=t[n(463)]&&t[n(555)](n(463))&&(i[n(463)]=t[n(463)]),t[n(602)]&&(r=Object[n(511)](t[n(602)]))[n(569)])for(i[n(602)]={},a=0;a<r[n(569)];++a)i[n(602)][r[a]]=t[n(602)][r[a]];return null!=t[n(534)]&&t[n(555)](n(534))&&(i[n(534)]=t[n(534)]),i},i[o(582)][o(509)]=function(){var t=o;return this[t(546)][t(487)](this,u[t(502)][t(566)])},i[o(589)]=function(t){var e=o;return void 0===t&&(t=e(466)),t+e(455)},i}(),s})(),Or=vr;function vr(t,e){const n=Sr();return(vr=function(t,e){return n[t-=182]})(t,e)}!function(t){const e=vr,n=t();for(;;)try{if(152970===-parseInt(e(204))/1*(-parseInt(e(201))/2)+parseInt(e(199))/3*(-parseInt(e(184))/4)+parseInt(e(198))/5*(parseInt(e(194))/6)+parseInt(e(195))/7*(-parseInt(e(183))/8)+parseInt(e(182))/9*(-parseInt(e(191))/10)+-parseInt(e(200))/11+parseInt(e(185))/12*(parseInt(e(197))/13))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Sr);class wr{[Or(205)];constructor(){this[Or(205)]=Ir}[Or(189)](t){return new kr(this[Or(205)][t])}}function Sr(){const t=["5542620wysbrj","compress","decode","encode","getDescriptor","decompress","10tzgWdq","finish","create","29262JHwqwM","835051scquvS","toObject","13LPhhWZ","160LkTqKa","298293GbLSun","329516oBdlel","194bHlFeV","verify","_protobuf","2499SuXJqX","_protobufRoot","2159802tueNSa","16iPbBqb","8FjagYc"];return(Sr=function(){return t})()}class kr{[Or(203)];constructor(t){this[Or(203)]=t}[Or(186)](t){const e=Or,n=this[e(203)][e(202)](t);if(n)throw Error(n);return this[e(203)][e(188)](this[e(203)][e(193)](t))[e(192)]()}[Or(190)](t){const e=Or;return this[e(203)][e(196)](this[e(203)][e(187)](t),{oneofs:!0})}}function Ar(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}function Tr(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const _r="[object RegExp]",Cr="[object String]",Pr="[object Number]",Er="[object Boolean]",jr="[object Arguments]",Dr="[object Symbol]",xr="[object Date]",Rr="[object Map]",Nr="[object Set]",Vr="[object Array]",Mr="[object ArrayBuffer]",Br="[object Object]",Jr="[object DataView]",Ur="[object Uint8Array]",qr="[object Uint8ClampedArray]",Lr="[object Uint16Array]",Gr="[object Uint32Array]",Yr="[object Int8Array]",Hr="[object Int16Array]",zr="[object Int32Array]",Fr="[object Float32Array]",Kr="[object Float64Array]";function Wr(t,e,n,r=new Map,s=void 0){const o=s?.(t,e,n,r);if(null!=o)return o;if(function(t){return null==t||"object"!=typeof t&&"function"!=typeof t}(t))return t;if(r.has(t))return r.get(t);if(Array.isArray(t)){const e=new Array(t.length);r.set(t,e);for(let o=0;o<t.length;o++)e[o]=Wr(t[o],o,n,r,s);return Object.hasOwn(t,"index")&&(e.index=t.index),Object.hasOwn(t,"input")&&(e.input=t.input),e}if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){const e=new RegExp(t.source,t.flags);return e.lastIndex=t.lastIndex,e}if(t instanceof Map){const e=new Map;r.set(t,e);for(const[o,i]of t)e.set(o,Wr(i,o,n,r,s));return e}if(t instanceof Set){const e=new Set;r.set(t,e);for(const o of t)e.add(Wr(o,void 0,n,r,s));return e}if("undefined"!=typeof Buffer&&Buffer.isBuffer(t))return t.subarray();if(function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(t)){const e=new(Object.getPrototypeOf(t).constructor)(t.length);r.set(t,e);for(let o=0;o<t.length;o++)e[o]=Wr(t[o],o,n,r,s);return e}if(t instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&t instanceof SharedArrayBuffer)return t.slice(0);if(t instanceof DataView){const e=new DataView(t.buffer.slice(0),t.byteOffset,t.byteLength);return r.set(t,e),Qr(e,t,n,r,s),e}if("undefined"!=typeof File&&t instanceof File){const e=new File([t],t.name,{type:t.type});return r.set(t,e),Qr(e,t,n,r,s),e}if(t instanceof Blob){const e=new Blob([t],{type:t.type});return r.set(t,e),Qr(e,t,n,r,s),e}if(t instanceof Error){const e=new t.constructor;return r.set(t,e),e.message=t.message,e.name=t.name,e.stack=t.stack,e.cause=t.cause,Qr(e,t,n,r,s),e}if("object"==typeof t&&function(t){switch(Tr(t)){case jr:case Vr:case Mr:case Jr:case Er:case xr:case Fr:case Kr:case Yr:case Hr:case zr:case Rr:case Pr:case Br:case _r:case Nr:case Cr:case Dr:case Ur:case qr:case Lr:case Gr:return!0;default:return!1}}(t)){const e=Object.create(Object.getPrototypeOf(t));return r.set(t,e),Qr(e,t,n,r,s),e}return t}function Qr(t,e,n=t,r,s){const o=[...Object.keys(e),...Ar(e)];for(let i=0;i<o.length;i++){const a=o[i],c=Object.getOwnPropertyDescriptor(t,a);(null==c||c.writable)&&(t[a]=Wr(e[a],a,n,r,s))}}function Xr(t,e){return function(t,e){return Wr(t,void 0,t,new Map,e)}(t,(n,r,s,o)=>{const i=e?.(n,r,s,o);if(null!=i)return i;if("object"==typeof t)switch(Object.prototype.toString.call(t)){case Pr:case Cr:case Er:{const e=new t.constructor(t?.valueOf());return Qr(e,t),e}case jr:{const e={};return Qr(e,t),e.length=t.length,e[Symbol.iterator]=t[Symbol.iterator],e}default:return}})}function Zr(t){return Xr(t)}function $r(t){if(!t||"object"!=typeof t)return!1;const e=Object.getPrototypeOf(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e))&&"[object Object]"===Object.prototype.toString.call(t)}function ts(t,e,n,r,s,o,i){const a=i(t,e,n,r,s,o);if(void 0!==a)return a;if(typeof t==typeof e)switch(typeof t){case"bigint":case"string":case"boolean":case"symbol":case"undefined":case"function":return t===e;case"number":return t===e||Object.is(t,e);case"object":return es(t,e,o,i)}return es(t,e,o,i)}function es(t,e,n,r){if(Object.is(t,e))return!0;let s=Tr(t),o=Tr(e);if(s===jr&&(s=Br),o===jr&&(o=Br),s!==o)return!1;switch(s){case Cr:return t.toString()===e.toString();case Pr:return function(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)}(t.valueOf(),e.valueOf());case Er:case xr:case Dr:return Object.is(t.valueOf(),e.valueOf());case _r:return t.source===e.source&&t.flags===e.flags;case"[object Function]":return t===e}const i=(n=n??new Map).get(t),a=n.get(e);if(null!=i&&null!=a)return i===e;n.set(t,e),n.set(e,t);try{switch(s){case Rr:if(t.size!==e.size)return!1;for(const[s,o]of t.entries())if(!e.has(s)||!ts(o,e.get(s),s,t,e,n,r))return!1;return!0;case Nr:{if(t.size!==e.size)return!1;const s=Array.from(t.values()),o=Array.from(e.values());for(let i=0;i<s.length;i++){const a=s[i],c=o.findIndex(s=>ts(a,s,void 0,t,e,n,r));if(-1===c)return!1;o.splice(c,1)}return!0}case Vr:case Ur:case qr:case Lr:case Gr:case"[object BigUint64Array]":case Yr:case Hr:case zr:case"[object BigInt64Array]":case Fr:case Kr:if("undefined"!=typeof Buffer&&Buffer.isBuffer(t)!==Buffer.isBuffer(e))return!1;if(t.length!==e.length)return!1;for(let s=0;s<t.length;s++)if(!ts(t[s],e[s],s,t,e,n,r))return!1;return!0;case Mr:return t.byteLength===e.byteLength&&es(new Uint8Array(t),new Uint8Array(e),n,r);case Jr:return t.byteLength===e.byteLength&&t.byteOffset===e.byteOffset&&es(new Uint8Array(t),new Uint8Array(e),n,r);case"[object Error]":return t.name===e.name&&t.message===e.message;case Br:{if(!(es(t.constructor,e.constructor,n,r)||$r(t)&&$r(e)))return!1;const s=[...Object.keys(t),...Ar(t)],o=[...Object.keys(e),...Ar(e)];if(s.length!==o.length)return!1;for(let o=0;o<s.length;o++){const i=s[o],a=t[i];if(!Object.hasOwn(e,i))return!1;if(!ts(a,e[i],i,t,e,n,r))return!1}return!0}default:return!1}}finally{n.delete(t),n.delete(e)}}function ns(){}function rs(t,e){return function(t,e,n){return ts(t,e,void 0,void 0,void 0,void 0,n)}(t,e,ns)}function ss(t){return null!==t&&("object"==typeof t||"function"==typeof t)}function os(){const t=["1902592alPYkO","nodes","36CaoEzu","125640PReLzn","path","main","492769vPbkHJ","root","195258QEVNET","$graveyard","6551928tBMqmD","4bSKQHJ","length","1006925LGCdnO","rootMain","2547iTaIfo","3089541ROWSXr","rootGraveyard"];return(os=function(){return t})()}function is(t,e){const n=os();return(is=function(t,e){return n[t-=449]})(t,e)}function as(t,e){const n=is,r=Zr(t);return r[n(459)][r[n(459)][n(449)]-1]+=e,r}function cs(t,e){const n=is;return t[n(462)]===e[n(462)]&&rs(t[n(459)],e[n(459)])}function us(t){const e=is;ls(t,t=>(e(460)==t[e(462)]?(t[e(451)]=!0,delete t[e(462)]):e(464)==t[e(462)]&&(t[e(454)]=!0,delete t[e(462)]),t))}function ds(t){const e=is;ls(t,t=>(t[e(451)]?(t[e(462)]=e(460),delete t[e(451)]):t[e(454)]&&(t[e(462)]=e(464),delete t[e(454)]),t))}function ls(t,e){const n=is;for(const r in t){const s=t[r];n(456)!==r&&ss(s)&&(s[n(459)]&&(s[n(462)]||s[n(451)]||s[n(454)])?t[r]=e(s):ls(s,e))}return t}function ps(t,e){const n=hs();return(ps=function(t,e){return n[t-=364]})(t,e)}function hs(){const t=["178615ivRqbm","1078278WsVRiv","10BJjWvG","_operationName","2281030SWzume","18kJFNEa","push","decompress","types","_id","10247128XsRlos","buffers","28JlMZuM","1800284zSIORB","3tqgNaY","45353792LcPSgf","shift","compress","__className","290578dlKUyG","_protobufDescriptor"];return(hs=function(){return t})()}!function(t){const e=is,n=t();for(;;)try{if(879498===parseInt(e(461))/1+-parseInt(e(455))/2+-parseInt(e(453))/3+-parseInt(e(466))/4*(parseInt(e(450))/5)+-parseInt(e(457))/6*(parseInt(e(463))/7)+-parseInt(e(465))/8+-parseInt(e(452))/9*(-parseInt(e(458))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(os);const fs=ps;!function(t){const e=ps,n=t();for(;;)try{if(733655===-parseInt(e(369))/1+parseInt(e(367))/2*(parseInt(e(383))/3)+parseInt(e(382))/4*(-parseInt(e(371))/5)+-parseInt(e(370))/6*(parseInt(e(381))/7)+-parseInt(e(379))/8+-parseInt(e(374))/9*(parseInt(e(373))/10)+parseInt(e(384))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(hs);class ms{[fs(378)];[fs(372)];[fs(368)];constructor(t,e,n){const r=fs;this[r(378)]=t,this[r(372)]=e,this[r(368)]=n}[fs(365)](t,e){const n=fs,r=e[n(364)]();return us(r),t[n(380)][n(375)](this[n(368)][n(365)](r)),t[n(377)][n(375)](this[n(378)]),!0}[fs(376)](t,e){const n=fs;e[n(377)][n(364)]();const r=this[n(368)][n(376)](e[n(380)][n(364)]());ds(r),r[n(366)]=this[n(372)],t[n(375)](r)}}function gs(t,e){const n=bs();return(gs=function(t,e){return n[t-=424]})(t,e)}const ys=gs;function bs(){const t=["_deserializeOneOf","compress","parse","9ykEAui","_protobufDescriptor","153918houNCU","528899evvlxS","__className","buffers","push","Json","605520TPIXQN","2050190RepqYj","stringify","75vlHjRJ","24CPWRlG","861nVJPoH","decompress","_serializeOneOf","oldValue","4447993Brvugv","_id","Boolean","23802WtPLVZ","_operationName","newValue","types","boolean","shift","38QImAxA"];return(bs=function(){return t})()}!function(t){const e=gs,n=t();for(;;)try{if(131465===-parseInt(e(426))/1+-parseInt(e(450))/2*(parseInt(e(437))/3)+-parseInt(e(432))/4+-parseInt(e(435))/5*(-parseInt(e(444))/6)+parseInt(e(427))/7*(-parseInt(e(436))/8)+-parseInt(e(424))/9*(-parseInt(e(433))/10)+parseInt(e(441))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(bs);class Is extends ms{[ys(452)](t,e){const n=ys,r=e[n(449)]();return this[n(439)](n(440),r),this[n(439)](n(446),r),us(r),t[n(429)][n(430)](this[n(425)][n(452)](r)),t[n(447)][n(430)](this[n(442)]),!0}[ys(438)](t,e){const n=ys,{types:r,buffers:s}=e,o=this[n(425)][n(438)](s[n(449)]());r[n(449)](),this[n(451)](n(440),o),this[n(451)](n(446),o),ds(o),o[n(428)]=this[n(445)],t[n(430)](o)}[ys(439)](t,e){const n=ys,r=e[t];n(448)==typeof r?e[t+n(443)]=r:e[t+n(431)]=JSON[n(434)](r)}[ys(451)](t,e){const n=ys,r=t+n(431);e[r]?(e[t]=JSON[n(453)](e[r]),delete e[r]):(e[t]=e[t+n(443)],delete e[t+n(443)])}}const Os=ws;function vs(){const t=["597746gQPPAf","attributesBoolean","18bJhPtO","66847dXJBNv","169808TnTTqe","stringify","buffers","_serializeNodesAttributes","parse","310605ZwpVPu","types","shift","_id","1804408MvjdqI","decompress","compress","nodes","_operationName","1495368aVuGpb","push","_protobufDescriptor","attributes","769342oWFCUz","every","_deserializeNodesAttributes","keys","boolean","15jifFHs","children","_areValuesBoolean","__className","attributesJson"];return(vs=function(){return t})()}function ws(t,e){const n=vs();return(ws=function(t,e){return n[t-=248]})(t,e)}!function(t){const e=ws,n=t();for(;;)try{if(170518===parseInt(e(268))/1+parseInt(e(265))/2+parseInt(e(260))/3*(-parseInt(e(269))/4)+-parseInt(e(274))/5*(-parseInt(e(267))/6)+-parseInt(e(255))/7+-parseInt(e(278))/8+parseInt(e(251))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(vs);class Ss extends ms{[Os(248)](t,e){const n=Os,r=e[n(276)]();return this[n(272)](r[n(249)]),us(r),t[n(271)][n(252)](this[n(253)][n(248)](r)),t[n(275)][n(252)](this[n(277)]),!0}[Os(279)](t,e){const n=Os,{types:r,buffers:s}=e,o=this[n(253)][n(279)](s[n(276)]());r[n(276)](),o[n(249)]||(o[n(249)]=[]),this[n(257)](o[n(249)]),ds(o),o[n(263)]=this[n(250)],t[n(252)](o)}[Os(272)](t){const e=Os;for(const n of t){if(n[e(254)]){const t=n[e(254)];this[e(262)](t)?n[e(266)]=t:n[e(264)]=JSON[e(270)](t)}n[e(261)]&&this[e(272)](n[e(261)])}}[Os(257)](t){const e=Os;for(const n of t)(n[e(266)]||n[e(264)])&&(n[e(266)]?(n[e(254)]=n[e(266)],delete n[e(266)]):(n[e(254)]=JSON[e(273)](n[e(264)]),delete n[e(264)])),n[e(261)]&&this[e(257)](n[e(261)])}[Os(262)](t){const e=Os;return Object[e(258)](t)[e(256)](n=>e(259)==typeof t[n])}}function ks(t,e){const n=_s();return(ks=function(t,e){return n[t-=262]})(t,e)}const As=ks;!function(t){const e=ks,n=t();for(;;)try{if(683106===-parseInt(e(272))/1+parseInt(e(266))/2+-parseInt(e(274))/3*(parseInt(e(268))/4)+-parseInt(e(275))/5*(-parseInt(e(273))/6)+-parseInt(e(263))/7*(-parseInt(e(267))/8)+parseInt(e(262))/9+parseInt(e(271))/10*(-parseInt(e(264))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(_s);class Ts extends ms{[As(270)](t,e){const n=As;super[n(270)](t,e);const r=t[t[n(265)]-1];r[n(276)]||(r[n(276)]=null),r[n(269)]||(r[n(269)]=null)}}function _s(){const t=["164673tQPspU","1649767cVFQvD","858UxBTKB","length","2147272SUSszl","16XMHVsX","4042164aPqrZb","newRange","decompress","102990YeWPBQ","20639nzUxvp","114uOVYOo","3oWkfAb","251135HiqbFj","oldRange"];return(_s=function(){return t})()}function Cs(t,e){var n=Es();return(Cs=function(t,e){return n[t-=142]})(t,e)}var Ps=Cs;function Es(){var t=["937084xAvWBQ","8LzgDfe","_operationName","_id","3bhjSji","121iLcfhF","86834grxSpi","decompress","15270Tjwkij","50cdeALl","shift","84246HBFTFW","compress","3038067bctYLe","push","types","4440653xQBDLF","417736McXEcR"];return(Es=function(){return t})()}!function(t){for(var e=Cs,n=t();;)try{if(532666===parseInt(e(151))/1+-parseInt(e(144))/2+-parseInt(e(149))/3*(-parseInt(e(145))/4)+-parseInt(e(154))/5*(-parseInt(e(156))/6)+-parseInt(e(143))/7*(-parseInt(e(146))/8)+-parseInt(e(158))/9+parseInt(e(153))/10*(-parseInt(e(150))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Es);class js extends ms{[Ps(157)](t,e){var n=Ps;return e[n(155)](),t[n(142)][n(159)](this[n(148)]),!0}[Ps(152)](t,e){var n=Ps;e[n(142)][n(155)](),t[n(159)]({__className:this[n(147)]})}}const Ds=xs;function xs(t,e){const n=Rs();return(xs=function(t,e){return n[t-=205]})(t,e)}function Rs(){const t=["startsWith","_omittedNamespace","781TuzPyc","3515127ellAiR","name","MarkerOperation","5xSqnbc","404siGTUn","length","3630260MKuHHf","replace","decompress","277770CFiaTS","4910bUqYXb","__className","683571fhfdwx","6053436DEmIIU","4928982gCPIvZ","8NtlCRd","compress"];return(Rs=function(){return t})()}!function(t){const e=xs,n=t();for(;;)try{if(833473===parseInt(e(218))/1*(parseInt(e(224))/2)+-parseInt(e(214))/3+-parseInt(e(220))/4+-parseInt(e(217))/5*(parseInt(e(208))/6)+parseInt(e(206))/7+-parseInt(e(209))/8*(-parseInt(e(207))/9)+parseInt(e(223))/10*(parseInt(e(213))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Rs);class Ns extends Ts{[Ds(212)];constructor(t,e,n,r){const s=Ds;super(t,e,n),this[s(212)]=r+":"}[Ds(210)](t,e){const n=Ds;return!(n(216)!=e[0][n(205)]||!e[0][n(215)][n(211)](this[n(212)])||(e[0][n(215)]=e[0][n(215)][n(221)](new RegExp("^"+this[n(212)]),""),super[n(210)](t,e),0))}[Ds(222)](t,e){const n=Ds;super[n(222)](t,e);const r=t[t[n(219)]-1];r[n(215)]=this[n(212)]+r[n(215)]}}function Vs(){const t=["152583MCyAXm","991ExpguM","shift","push","types","1128ahFnny","10232706iDWLRT","buffers","_compressSingleOperation","7210lhSPAr","_context","_compareOperations","39337392mBrakL","length","45562ERCqCf","13690143MxiMbx","_combineNext","_decompressSingleOperation","3080dojHDB","16vJnRxe","5aCkTnH","_splitCurrent","compress","decompress","_id","1564cjSxtm"];return(Vs=function(){return t})()}const Ms=Bs;function Bs(t,e){const n=Vs();return(Bs=function(t,e){return n[t-=409]})(t,e)}!function(t){const e=Bs,n=t();for(;;)try{if(900986===parseInt(e(409))/1*(-parseInt(e(433))/2)+-parseInt(e(434))/3*(-parseInt(e(427))/4)+-parseInt(e(428))/5*(parseInt(e(414))/6)+parseInt(e(417))/7*(parseInt(e(413))/8)+-parseInt(e(423))/9+parseInt(e(426))/10*(parseInt(e(422))/11)+parseInt(e(420))/12)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Vs);class Js{[Ms(432)];[Ms(418)];constructor(t,e){const n=Ms;this[n(432)]=t,this[n(418)]=e}[Ms(430)](t,e){const n=Ms;let r;for(;e[n(421)]>1&&this[n(419)](e[0],e[1]);)r?(r=this[n(424)](e[n(410)](),r),t[n(412)][n(411)](0)):(r=Zr(e[n(410)]()),t[n(412)][n(411)](this[n(432)]));return!!r&&(r=this[n(424)](e[n(410)](),r),t[n(412)][n(411)](0),t[n(415)][n(411)](this[n(416)](r)),!0)}[Ms(431)](t,e){const n=Ms,r=this[n(425)](e);for(;0==e[n(412)][0];)e[n(412)][n(410)](),t[n(411)](this[n(429)](r));t[n(411)](r)}}const Us=Ls;function qs(){const t=["value","attributes","every","2956484RPCVMx","_checkOperation","buffers","56tATdHy","1148nxpDSy","_compareOperations","nodes","_context","2601LLRmut","compress","__className","wasUndone","decompress","46962fsZIBw","_compressSingleOperation","_combineNext","583218ZKiqEi","_decompressSingleOperation","substr","from","InsertOperation","1126lmIUTo","21255190UsZflN","11PyNUcG","_splitCurrent","4460330nngAaG","position","keys","5555004XKgsJE","data","_getCompressorByName","next","_compareAttributes","length","iterator"];return(qs=function(){return t})()}function Ls(t,e){const n=qs();return(Ls=function(t,e){return n[t-=137]})(t,e)}!function(t){const e=Ls,n=t();for(;;)try{if(928527===-parseInt(e(155))/1*(parseInt(e(168))/2)+parseInt(e(137))/3+-parseInt(e(147))/4+parseInt(e(172))/5+-parseInt(e(160))/6*(parseInt(e(151))/7)+-parseInt(e(150))/8*(parseInt(e(163))/9)+parseInt(e(169))/10*(parseInt(e(170))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(qs);class Gs extends Js{[Us(162)](t,e){const n=Us;return e[n(153)][0][n(138)]+=t[n(153)][0][n(138)],e}[Us(171)](t){const e=Us,n=Zr(t),r=n[e(153)][0],s=t[e(153)][0],o=s[e(138)][Symbol[e(143)]]()[e(140)]()[e(144)],i=o[e(142)];return r[e(138)]=o,s[e(138)]=s[e(138)][e(165)](i),t[e(173)]=as(t[e(173)],i),n}[Us(152)](t,e){const n=Us;if(this[n(148)](t)&&this[n(148)](e)){const r=t[n(153)][0][n(138)][n(142)],s=cs(as(t[n(173)],r),e[n(173)]),o=t[n(153)][0],i=e[n(153)][0];return s&&this[n(141)](o,i)}return!1}[Us(161)](t){const e=Us,n={types:[],buffers:[],baseVersion:0};return this[e(154)][e(139)](e(167))[e(156)](n,[t]),n[e(149)][0]}[Us(164)](t){const e=Us,n=[];return this[e(154)][e(139)](e(167))[e(159)](n,t),n[0]}[Us(148)](t){const e=Us;return e(167)==t[e(157)]&&1==t[e(153)][e(142)]&&t[e(153)][0][e(138)]&&!t[e(158)]&&1==Array[e(166)](t[e(153)][0][e(138)])[e(142)]}[Us(141)](t,e){const n=Us,r=Object[n(174)](t[n(145)]||{}),s=Object[n(174)](e[n(145)]||{});return r[n(142)]===s[n(142)]&&r[n(146)](r=>e[n(145)][r]&&e[n(145)][r]===t[n(145)][r])}}const Ys=Hs;function Hs(t,e){const n=zs();return(Hs=function(t,e){return n[t-=352]})(t,e)}function zs(){const t=["869544pQNkuj","22kqNHfZ","_compareOperations","_decompressSingleOperation","buffers","_splitCurrent","__className","7463880ROBeKx","decompress","howMany","30365AZahRU","targetPosition","$graveyard","2743680gQUYfZ","_getCompressorByName","381vKDlUZ","sourcePosition","root","2114724UpJmYW","5008899dYKPge","_combineNext","MoveOperation","_compressSingleOperation","_context","200KHNxWt","wasUndone","_checkOperation","24868BGcWvD","compress"];return(zs=function(){return t})()}!function(t){const e=Hs,n=t();for(;;)try{if(506162===parseInt(e(379))/1*(parseInt(e(370))/2)+-parseInt(e(355))/3*(-parseInt(e(367))/4)+-parseInt(e(353))/5+-parseInt(e(358))/6+-parseInt(e(359))/7+-parseInt(e(376))/8+-parseInt(e(369))/9*(-parseInt(e(364))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(zs);class Fs extends Js{[Ys(360)](t,e){const n=Ys;return e[n(378)]++,e[n(356)]=Zr(t[n(356)]),e}[Ys(374)](t){const e=Ys,n=Zr(t);return t[e(378)]--,n[e(378)]=1,n[e(356)]=as(n[e(356)],t[e(378)]),n}[Ys(371)](t,e){const n=Ys;return!(!this[n(366)](t)||!this[n(366)](e))&&cs(as(t[n(356)],-1),e[n(356)])&&cs(t[n(380)],e[n(380)])}[Ys(362)](t){const e=Ys,n={types:[],buffers:[],baseVersion:0};return this[e(363)][e(354)](e(361))[e(368)](n,[t]),n[e(373)][0]}[Ys(372)](t){const e=Ys,n=[];return this[e(363)][e(354)](e(361))[e(377)](n,t),n[0]}[Ys(366)](t){const e=Ys;return e(361)==t[e(375)]&&e(352)==t[e(380)][e(357)]&&1==t[e(378)]&&!t[e(365)]}}function Ks(t,e){const n=Ws();return(Ks=function(t,e){return n[t-=267]})(t,e)}function Ws(){const t=["190FLdYMR","_decompressSingleOperation","8aDgmwl","sourcePosition","decompress","__className","_context","targetPosition","_getCompressorByName","48429pAgMmv","MoveOperation","buffers","3023235UYXiFx","wasUndone","root","_combineNext","compress","_splitCurrent","796833uZRorP","$graveyard","13003qocrRd","3529008bNkCtx","_checkOperation","howMany","68SFjQDb","1402566dLtiiQ","_compressSingleOperation","_compareOperations","80416Rcklvk"];return(Ws=function(){return t})()}const Qs=Ks;!function(t){const e=Ks,n=t();for(;;)try{if(314565===parseInt(e(295))/1*(-parseInt(e(270))/2)+-parseInt(e(293))/3*(-parseInt(e(277))/4)+-parseInt(e(287))/5+parseInt(e(271))/6+parseInt(e(267))/7+-parseInt(e(274))/8+-parseInt(e(284))/9*(-parseInt(e(275))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ws);class Xs extends Js{[Qs(290)](t,e){return e[Qs(269)]++,e}[Qs(292)](t){const e=Qs,n=Zr(t);return n[e(269)]=1,t[e(269)]--,n}[Qs(273)](t,e){const n=Qs;return!(!this[n(268)](t)||!this[n(268)](e))&&cs(t[n(278)],e[n(278)])&&cs(t[n(282)],e[n(282)])}[Qs(272)](t){const e=Qs,n={types:[],buffers:[],baseVersion:0};return this[e(281)][e(283)](e(285))[e(291)](n,[t]),n[e(286)][0]}[Qs(276)](t){const e=Qs,n=[];return this[e(281)][e(283)](e(285))[e(279)](n,t),n[0]}[Qs(268)](t){const e=Qs;return e(285)==t[e(280)]&&e(294)==t[e(282)][e(289)]&&1==t[e(269)]&&!t[e(288)]}}function Zs(t,e){const n=to();return(Zs=function(t,e){return n[t-=434]})(t,e)}const $s=Zs;function to(){const t=["56646eTLXlA","68360HwQhwx","types","split","_getCompressorByName","__className","1030104dpcbTW","user:","429282XsPdFG","33895kzEEHs","oldRange","name","stickiness","shift","_context","_id","startsWith","MarkerOperation","decompress","compress","user:position:","14vBVZdl","toNone","push","_compareOperations","buffers","646788DXHlyg","477xOcpHT","_compressSingleOperation","newRange","end","start","_decompressSingleOperation","439080QkjhLw"];return(to=function(){return t})()}!function(t){const e=Zs,n=t();for(;;)try{if(102577===-parseInt(e(447))/1+-parseInt(e(459))/2*(parseInt(e(438))/3)+-parseInt(e(464))/4+parseInt(e(437))/5+-parseInt(e(444))/6+parseInt(e(446))/7+parseInt(e(439))/8*(parseInt(e(465))/9))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(to);class eo extends Js{[$s(457)](t,e){const n=$s;if(!this[n(462)](e[0],e[1]))return!1;const r=e[n(451)]();return r[n(448)]=null,r[n(467)]&&cs(r[n(467)][n(435)],r[n(467)][n(434)])&&(r[n(467)][n(434)]=null),e[n(451)](),t[n(440)][n(461)](this[n(453)]),t[n(440)][n(461)](0),t[n(463)][n(461)](this[n(466)](r)),!0}[$s(456)](t,e){const n=$s,r=this[n(436)](e);r[n(467)]&&!r[n(467)][n(434)]&&(r[n(467)][n(434)]=Zr(r[n(467)][n(435)]));const s=Zr(r);s[n(467)]&&(s[n(467)][n(435)][n(450)]=n(460),s[n(467)][n(434)]=Zr(s[n(467)][n(435)])),s[n(449)]=n(458)+s[n(449)][n(441)](":")[2],e[n(440)][n(451)](),t[n(461)](r),t[n(461)](s)}[$s(466)](t){const e=$s,n={types:[],buffers:[],baseVersion:0};return this[e(452)][e(442)](e(455))[e(457)](n,[t]),n[e(463)][0]}[$s(436)](t){const e=$s,n=[];return this[e(452)][e(442)](e(455))[e(456)](n,t),n[0]}[$s(462)](t,e){const n=$s;return!!(t&&e&&n(455)==t[n(443)]&&n(455)==e[n(443)]&&t[n(449)][n(454)](n(445))&&e[n(449)][n(454)](n(445))&&t[n(449)]!=e[n(449)])}}const no=so;function ro(){const t=["InsertOperation","SplitOperation","__className","_registerCompressor","AttributeOperation","_getCompressorByName","suggestion","CommentMarkerOperation","RenameOperation","NoOperation","types","8477448XOxukY","99bCRXAB","length","decompress","RootOperation","1386396cHyVjN","SuggestionMarkerOperation","MergeOperation","no-operations-provided","DeletingAction","forEach","UserSelectionAction","ForwardDeletingAction","7186890ROFKCo","baseVersion","MoveOperation","1231951hpxmJQ","_protobufFactory","_registerOperationCompressor","decompress-compressor-not-found","comment","get","_compressorByName","RootAttributeOperation","20KGdUZE","1260694PXUaST","9RBORVP","75HtMqIK","_registerActionCompressor","TypingAction","MarkerOperation","7371876OxckDg","set","compress","getDescriptor","40818oQrUtj","_compressorById"];return(ro=function(){return t})()}function so(t,e){const n=ro();return(so=function(t,e){return n[t-=183]})(t,e)}!function(t){const e=so,n=t();for(;;)try{if(846566===-parseInt(e(192))/1+parseInt(e(202))/2*(-parseInt(e(194))/3)+-parseInt(e(220))/4*(parseInt(e(191))/5)+-parseInt(e(198))/6+-parseInt(e(183))/7+parseInt(e(215))/8*(-parseInt(e(193))/9)+parseInt(e(228))/10*(parseInt(e(216))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ro);class oo{[no(203)];[no(189)];[no(184)];constructor(){const t=no;this[t(203)]=new Map,this[t(189)]=new Map,this[t(184)]=new wr;const e=this[t(184)][t(201)](t(197));this[t(207)](1,t(213),new js(1,t(213),void 0)),this[t(185)](10,t(208),Is),this[t(185)](11,t(204),Ss),this[t(185)](12,t(197),Ts),this[t(185)](13,t(222),ms),this[t(185)](14,t(230),ms),this[t(185)](15,t(212),ms),this[t(185)](16,t(190),Is),this[t(185)](17,t(205),ms),this[t(207)](18,t(211),new Ns(18,t(197),e,t(187))),this[t(207)](19,t(221),new Ns(19,t(197),e,t(210))),this[t(185)](20,t(219),ms),this[t(195)](100,t(196),Gs),this[t(195)](101,t(224),Fs),this[t(195)](102,t(227),Xs),this[t(195)](103,t(226),eo)}[no(200)](t){const e=no;if(!t||!t[0])throw new n.CKEditorError(e(223),this);const r={types:[],buffers:[],baseVersion:t[0][e(229)]};for(;t[e(217)];)this[e(209)](e(226))[e(200)](r,t)||this[e(209)](e(196))[e(200)](r,t)||this[e(209)](e(224))[e(200)](r,t)||this[e(209)](e(227))[e(200)](r,t)||this[e(209)](e(211))[e(200)](r,t)||this[e(209)](e(221))[e(200)](r,t)||this[e(209)](t[0][e(206)])[e(200)](r,t);return r}[no(218)](t){const e=no,r=[];for(;t[e(214)][e(217)];){const s=this[e(203)][e(188)](t[e(214)][0]);if(!s)throw new n.CKEditorError(e(186),this,{type:t[e(214)][0]});s[e(218)](r,t)}return r[e(225)]((n,r)=>n[e(229)]=t[e(229)]+r),r}[no(209)](t){const e=no;return this[e(189)][e(188)](t)}[no(185)](t,e,n){const r=no,s=new n(t,e,this[r(184)][r(201)](e));this[r(207)](t,e,s)}[no(195)](t,e,n){const r=no,s=new n(t,this);this[r(207)](t,e,s)}[no(207)](t,e,n){const r=no;this[r(203)][r(199)](t,n),this[r(189)][r(199)](e,n)}}function io(t,e){var n=ao();return(io=function(t,e){return n[t-=261]})(t,e)}function ao(){var t=["74211TzaBmj","6RRxpnN","93892hIwqYI","14885189oWiFoj","10cmzSBG","30znZizu","833450WnLBno","52rtmktF","5850952CiiEIz","35679XLAPes","3833703BxTBNj"];return(ao=function(){return t})()}!function(t){for(var e=io,n=t();;)try{if(564556===parseInt(e(264))/1+-parseInt(e(265))/2*(-parseInt(e(269))/3)+-parseInt(e(271))/4*(-parseInt(e(263))/5)+parseInt(e(270))/6*(-parseInt(e(267))/7)+parseInt(e(266))/8+-parseInt(e(268))/9*(parseInt(e(262))/10)+-parseInt(e(261))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ao);const co=lo;function uo(){const t=["editor","_connectService","372349aHYUMy","disconnect","_decompressOperations","_getAffectedRoot","disconnected","$root","getMany","initData","enqueueChange","realtimecollaborationclient-init-document-already-initialized","createdAt","_currentBufferDelay","_handleReconnectionResponse","applyOperation","_lastServerVersion","_waitUntilSynced","cloud-services-internal-error: Collaborative Editing Service is not connected.","change:_isEditingAllowed","init","round","1668076oxaPWH","_handleReconnectionError","_handleSendingSelectionMarkers","wasUndone","realtimecollaborationclient-init-service-internal-error","version","sendOperations","_compressor","clone","_initThrowingOnDataSet","InsertOperation","data","isEnabled","_setUpDataInit","realtimecollaborationclient","model","high","set","affectedSelectable","entries","realtimecollaborationclient-init-non-existent-root","setIdForTheLastOperation","decompress","_offset","isOfficialPlugin","insert","9PzROGA","_channelId","startsWith","rootsAttributes","suppressErrorInCollaboration","newRange","realtimecollaborationclient-handleserverresponse","The last saved version of the document does not match the local version. To not lose your content save it locally and refresh the editor.","setPermissions","_saveOperationInBuffer","destroy","_bufferedOperations","editing","differ","_isPendingUpdate","_isDisconnection","change:_isPendingUpdate","_lastSyncedOperationId","lastSyncVersion","root","_isInit","includes","Permissions","batch","currentDocumentSession","position","stopListening","_sendBufferedOperationsDelayed","_handleServerResponse","_operationToId","keys","fromJSON","realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration","2uvPrfH","_ignoredOperations","off","409","cloudServices.bundleVersion","from","remove","2597656XtdEBk","plugins","The document cannot be connected back to the server. To not lose your content save it locally and refresh the editor.","_document","filter","error","_initSessionsHandling","Notification","collaboration.channelId","change:range","reconnect","serverHistory","toJSON","connection","cs:removeUser","CollaborativeEditingService","showWarning","cloudDocumentVersion","forEach","_service","CommentsOnly","define","_sendBufferedOperationsDelayId","locale","collaboration-missing-channelid","attributes","_handleInitialConnectionData","_isConnected","createRange","451jOmdka","rootName","isReadOnly","1204227BIXrld","getUser","loadRoot","metadata","change:hasDomSelection","Synchronization issue","length","isUndoneOperation","realtimecollaborationclient-sendbufferedoperations","finally","directChange","map","reconnection: flushed session","_knownOperations","operationsReceived","isDocumentOperation","message","view","305850JhECdA","lastOperationId","_compressOperations","getOperations","addUser","sessionId","return","path","start","connected","_pendingAction","apply","connect","size","catch","_isLoaded","_updateServerHistory","push","_addKnownRoot","_bufferRootLoad","realtimecollaborationclient-init-connection-failed","createUserMarkerOperations","_applyOperationsSet","roots","_handleExternalOperations","register","_connectAfterSessionHasBeenFlushed","_disconnectService","_fetchMissingUsers","compress","_getOperationsFromInitData","get","userId","getRoot","mySessionId","permissions","rtc-destroyed","createRoot","channelSessions","2119418DCsmBw","then","_knownRootNames","The document details could not be taken during the reconnection. To not lose your content save it locally and refresh the editor.","pluginName","removeFromReconnectionStack","PENDING_ACTION_SENDING_DATA","state","_refreshUserSelectionMarkers","config","__className","_authorId","slice","affectsData","RealTimeCollaborationClient","404","offset","lastDocumentSession","fire","document:write","reset","baseVersion","real-time-collaboration","getIdOfTheLastOperation","_handleReceivedOperations","_hasSynchronizationProblem","_setPendingAction","addToReconnectionStack","_hasSelectionChanged","multi-root-editor-root-attributes-no-root","_operationIdentifier","The local document and server document differ and merging them can cause unexpected behavior. To not lose your content save it locally and refresh the editor.","_crash","document","realtimecollaborationclient-init-session-connection-error","lastOperationAcceptedAt","_isEditingAllowed","_clearPendingAction","addRoot","_loadRoot","_disconnectionOperations","getDocumentDetails","_isAttached","code","sessionAdd:","rtc-offline","targetPosition","collaboration","cloud-services-internal-error: Request timeout.","add","marker","1789602NVAJqk","addOperation","cloud-services-internal-error: Not connected.","wereChangesApplied","isPremiumPlugin","_shouldSendUpdate","realtimecollaborationclient-error","getOperationAuthor","has","_sendBufferedOperations","string","disableReadOnlyMode","realtimecollaborationclient-init-service-incorrect-server-operation","stop","getConnectedSessions","createPositionFromPath","createPositionAt","move","end","requires","addRootAttribute","_shouldSendSelectionUpdate","ready","type","sessionCreatedAt","listenTo","history","_baseBufferDelay","enableReadOnlyMode","unregister","selection","markers","parse","5YmTuTh","bind"];return(uo=function(){return t})()}function lo(t,e){const n=uo();return(lo=function(t,e){return n[t-=245]})(t,e)}!function(t){const e=lo,n=t();for(;;)try{if(213126===parseInt(e(474))/1*(parseInt(e(290))/2)+parseInt(e(329))/3+-parseInt(e(494))/4*(-parseInt(e(470))/5)+parseInt(e(437))/6+parseInt(e(386))/7+parseInt(e(297))/8*(-parseInt(e(257))/9)+-parseInt(e(347))/10*(parseInt(e(326))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(uo);let po=1;class ho extends e.Plugin{static[co(312)]=(()=>vn)();[co(254)];[co(352)];[co(308)];[co(258)];[co(316)];[co(300)];[co(501)];[co(268)];[co(342)];[co(388)];[co(357)];[co(414)];[co(319)];[co(464)];[co(485)];[co(274)];[co(426)];[co(416)];static get[co(456)](){return[Fn,Zn,fr,e.PendingActions,Kn.Users,r.Notification]}static get[co(390)](){return co(400)}static get[co(255)](){return!0}static get[co(441)](){return!0}get[co(314)](){const t=co;return this[t(488)]+this[t(254)]}get[co(488)](){const t=co;return this[t(308)][t(499)]-this[t(254)]}get[co(275)](){const t=co,e=this[t(308)][t(350)]();for(let n=e[t(335)]-1;n>=0;n--){const r=e[n];if(!this[t(426)][t(445)](r))return r[t(407)]+1-this[t(254)]}return 0}constructor(t){const e=co;if(super(t),this[e(254)]=0,this[e(352)]=null,this[e(308)]=new s.History,this[e(472)][e(395)][e(318)](e(433),{}),this[e(258)]=this[e(472)][e(395)][e(378)](e(305)),!this[e(258)])throw new n.CKEditorError(e(321),this);const r=t[e(395)][e(378)](e(294))||n.version;this[e(316)]=new(ho[e(312)])(r,this[e(258)]),this[e(300)]=this[e(472)][e(246)][e(419)],this[e(501)]=new oo,this[e(268)]=[],this[e(342)]=new WeakSet,this[e(388)]=new Set,this[e(248)](e(271),!1),this[e(248)](e(411),!1),this[e(357)]=null,this[e(414)]=!1,this[e(319)]=null,this[e(464)]=300,this[e(485)]=this[e(464)],this[e(274)]=null,this[e(426)]=new WeakSet,this[e(416)]=new go(this[e(426)])}[co(492)](){const t=co,e=this[t(472)],n=e[t(298)][t(378)](Kn.Users),r=e[t(298)][t(378)](Fn);this[t(462)](n,t(444),(e,r)=>{const s=t,o=r[0];o[s(397)]&&(e[s(353)]=n[s(330)](o[s(397)]),e[s(450)]()),null===o[s(397)]&&(e[s(353)]=null,e[s(450)]())},{priority:t(247)}),this[t(462)](e[t(246)][t(419)][t(467)],t(306),(e,n)=>{const r=t;n[r(339)]&&this[r(394)]()}),this[t(462)](e[t(269)][t(346)],t(333),()=>{this[t(394)]()}),this[t(503)](),e[t(246)].on(t(487),(e,n)=>{const r=t,s=n[0];s[r(344)]&&(this[r(266)](s),this[r(442)]()&&this[r(284)]())}),this[t(507)](),this[t(471)](t(422)).to(r,t(393),this,t(411),(e,n)=>t(356)===e&&!n),this.on(t(491),()=>{const n=t;this[n(422)]?e[n(448)](n(431)):e[n(465)](n(431))}),this[t(422)]?e[t(448)](t(431)):e[t(465)](t(431)),this[t(248)](t(324),!1)}async[co(307)](){const t=co,e=this[t(472)][t(298)][t(378)](Zn),n=this[t(472)][t(298)][t(378)](Fn);try{this[t(271)]=!0,e[t(466)](this[t(258)]);const r=await this[t(316)][t(307)](n[t(310)],this[t(275)]);await this[t(486)](r)&&(this[t(271)]=!1,this[t(423)]());const s=await this[t(316)][t(451)]();e[t(372)](this[t(258)],s),this[t(496)](),this[t(324)]=!0}catch(e){if(function(e){const n=t;return n(401)===e[n(429)]}(e)&&this[t(352)])await this[t(373)]();else if(function(e){const n=t;return n(293)===e[n(429)]}(e)){const e=gr(this[t(472)][t(320)],t(299));this[t(495)](e)}else{if(!(e instanceof fo))throw e;this[t(495)]()}}}[co(267)](){const t=co,e=this[t(472)][t(298)][t(378)](Fn),n=this[t(472)][t(298)][t(378)](Zn);this[t(472)][t(465)](t(383)),n[t(385)][t(445)](this[t(258)])&&n[t(466)](this[t(258)]),e[t(391)](this),this[t(374)](),super[t(267)]()}async[co(486)](t){const e=co;if(this[e(352)]!==t[e(352)]&&this[e(274)]!==t[e(348)])throw new fo;return this[e(352)]=t[e(352)],this[e(285)]([],{...t,wereChangesApplied:!1,data:t[e(505)]},e(307))}async[co(473)](t,e=!1){const n=co,{connection:r}=this[n(472)][n(298)][n(378)](Fn);ho[n(312)][n(451)](r,this[n(258)])[n(387)](t=>this[n(303)](t))[n(361)](t=>{const e=n;this[e(418)](e(420),t)}),this[n(462)](this[n(316)],n(343),this[n(410)][n(471)](this)),this[n(462)](this[n(316)],n(302),(t,e)=>{const r=n;this[r(418)](r(498),e)}),this[n(462)](this[n(316)],n(478),()=>{this[n(324)]=!1});const s=this[n(416)][n(409)](t);this[n(271)]=!0;const o=await this[n(316)][n(359)](r,this[n(349)](t),s);if(this[n(352)]=o[n(352)],e){if(!o[n(440)])return void this[n(495)]();this[n(271)]=!1,this[n(423)](),this[n(308)][n(406)](),this[n(254)]=o[n(402)],this[n(308)][n(499)]=this[n(254)],await this[n(285)](t,o,n(341))}else await this[n(323)](o,t);this[n(496)](),this[n(324)]=!0}[co(496)](){const t=co,e=this[t(472)][t(298)][t(378)](Zn),n=this[t(472)][t(298)][t(378)](fr),r=e[t(385)][t(378)](this[t(258)]);r&&r[t(335)]>1?n[t(368)]():this[t(462)](e,t(430)+this[t(258)],()=>{const r=t;2===e[r(385)][r(378)](this[r(258)])[r(335)]&&n[r(368)]()})}async[co(410)](t,e,n,r){const s=co;if(!this[s(271)]&&this[s(300)][s(499)]==e){const t=this[s(476)](n,r);await this[s(375)](t),this[s(371)](t,e,n[s(348)])||this[s(418)](s(449))}}async[co(373)](){const t=co;this[t(374)]();const{locale:e}=this[t(472)];let n;try{n=await this[t(316)][t(427)]()}catch{const n=gr(e,t(389));return void this[t(495)](n)}const r=n[t(281)]||n[t(403)];if(this[t(274)]!==r[t(348)]){const n=gr(e,t(264));return void this[t(495)](n)}await this[t(473)](this[t(472)][t(246)][t(419)][t(463)][t(350)](),!0)}[co(374)](){const t=co;this[t(316)][t(475)](),this[t(268)]=[],clearTimeout(this[t(319)]),this[t(283)](this[t(316)])}[co(303)](t){const e=co,n=this[e(472)][e(298)][e(378)](Zn);this[e(462)](n,e(430)+this[e(258)],(t,{session:r})=>{const s=e;if(r.id===n[s(381)]){t[s(292)]();const e=this[s(472)][s(298)][s(445)](s(317))&&this[s(472)][s(298)][s(378)](s(317));let n=r[s(382)];e&&e[s(506)]&&(n=n[s(301)](t=>s(405)!==t)),this[s(472)][s(298)][s(378)](s(279))[s(265)](n,this[s(258)])}}),n[e(372)](this[e(258)],t)}[co(503)](){const t=co,e=this[t(472)][t(505)][t(248)];this[t(472)][t(505)][t(248)]=(...r)=>{const s=t;if(!r[r[s(335)]-1][s(261)])throw new n.CKEditorError(s(289),this);e[s(358)](this[s(472)][s(505)],r)}}[co(507)](){const t=co;this[t(472)][t(505)].on(t(492),(e,[r])=>{const o=t;if(this[o(300)][o(499)])throw new n.CKEditorError(o(483),this);e[o(450)](),this[o(412)]();const i=this[o(472)][o(395)][o(378)](o(260)),a=this[o(377)](r,i);0==a[o(335)]&&a[o(364)](new s.NoOperation(0)),e[o(353)]=this[o(473)](a)[o(387)](()=>{const t=o;this[t(472)][t(298)][t(378)](Fn)[t(413)](this),this[t(472)][t(505)][t(404)](t(459))})[o(361)](t=>this[o(418)](o(367),t))[o(338)](()=>this[o(423)]())},{priority:t(247)}),this[t(472)].on(t(331),async(e,[n,r])=>{const s=t;e[s(450)]();const o=this[s(472)][s(246)][s(419)][s(380)](n);if(!this[s(388)][s(445)](n)){const t=r&&r[s(505)]?r[s(505)]:"",e=r&&r[s(322)]?r[s(322)]:{};await this[s(425)](n,t,e)}this[s(472)][s(246)][s(482)]({isUndoable:!1},()=>{const t=s;o[t(362)]=!0,this[t(472)][t(246)][t(419)][t(270)][t(366)](o)})},{priority:t(247)})}async[co(375)](t){const e=co,n=this[e(472)][e(298)][e(378)](Kn.Users),{connection:r}=this[e(472)][e(298)][e(378)](Fn),s=new Set;for(const r of t){const t=r[e(397)];t&&!n[e(330)](t)&&s[e(435)](t)}if(0===s[e(360)])return;const o=await I[e(480)](r,Array[e(295)](s));for(const t of o)n[e(330)](t.id)||n[e(351)](t)}[co(377)](t,e={}){const r=co,o=this[r(472)][r(246)],i=[];let a=0;const c=r(447)==typeof t?{main:t}:t;for(const t of Object[r(287)](c)){if(!this[r(300)][r(370)][r(445)](t))throw new n.CKEditorError(r(251),this);const e=this[r(472)][r(505)][r(469)](c[t]),u=this[r(300)][r(380)](t),d=new s.InsertOperation(o[r(453)](u,0),e,a++);i[r(364)](d);for(const[t,n]of e[r(468)]){const e=o[r(325)](o[r(452)](u,n[r(355)][r(354)][r(398)]()),o[r(452)](u,n[r(455)][r(354)][r(398)]())),c=new s.MarkerOperation(t,null,e,o[r(468)],!0,a++);i[r(364)](c)}}if(e)for(const[t,c]of Object[r(250)](e)){const e=o[r(419)][r(380)](t);if(!e)throw new n.CKEditorError(r(415),null);for(const[t,n]of Object[r(250)](c))if(null!==n){const o=new s.RootAttributeOperation(e,t,null,n,a++);i[r(364)](o)}}return i}async[co(425)](t,e,n){const r=co;this[r(377)]({[t]:e},{[t]:n})[r(315)]((t,e)=>{const n=r;t[n(407)]=this[n(300)][n(499)]+e,t[n(277)]=!0,this[n(266)](t)}),this[r(284)](),await this[r(489)]()}async[co(323)](t,e){const n=co;let r;this[n(254)]=t[n(402)];const s=t[n(440)]&&!t[n(481)],o=s?0:t[n(505)][n(407)];if(e[n(315)](e=>{const r=n;e[r(277)]=!0,e[r(484)]=t[r(461)],e[r(397)]=null}),s)r=e,this[n(369)](r,s);else{if(t[n(481)]){const e=this[n(377)](t[n(481)]);this[n(300)][n(463)][n(499)]=-e[n(335)],e[n(315)](r=>{const s=n;r[s(407)]-=e[s(335)],r[s(484)]=t[s(461)],r[s(277)]=!0,r[s(397)]=null}),this[n(369)](e,!0),this[n(308)][n(499)]=-e[n(335)]+this[n(254)],this[n(363)](e)}this[n(300)][n(463)][n(499)]=o,r=this[n(476)](t[n(505)],t[n(332)]),await this[n(375)](r),this[n(369)](r,s)}t[n(348)]&&(this[n(416)][n(252)](r,t[n(348)]),this[n(274)]=t[n(348)]),this[n(308)][n(499)]=o+this[n(254)],this[n(363)](r),e[n(301)](t=>{const e=n,r=this[e(477)](t);return r&&!this[e(388)][e(445)](r)})[n(315)]((t,e)=>{const r=n;t[r(407)]=this[r(300)][r(499)]+e,this[r(266)](t)}),this[n(442)]()?(this[n(485)]=0,this[n(284)](!0),await this[n(489)]()):(this[n(271)]=!1,this[n(423)]())}[co(418)](t,e){const r=co,s=e&&e[r(345)];if(s&&s[r(259)](r(245)))throw e;const o=this[r(472)][r(298)][r(378)](Fn);throw this[r(271)]=!0,o[r(475)](),this[r(472)][r(465)](r(443)),new n.CKEditorError(t,this[r(472)],s?{originalError:s}:void 0)}[co(266)](t){const e=co;this[e(342)][e(445)](t)||(this[e(342)][e(435)](t),this[e(268)][e(364)](t),this[e(357)]||e(436)==t[e(460)]&&!t[e(399)]||this[e(412)]())}[co(284)](t=!1){const e=co;!t&&this[e(271)]||(this[e(271)]=!0,clearTimeout(this[e(319)]),this[e(319)]=setTimeout(()=>{const t=e;this[t(446)]()[t(387)](e=>{const n=t;e&&(this[n(423)](),this[n(271)]=!1)})[t(361)](e=>{const n=t;this[n(423)](),this[n(271)]=!1,function(t){const e=n;return t[e(345)][e(259)](e(439))||t[e(345)][e(259)](e(490))||t[e(345)][e(259)](e(434))}(e)||this[n(418)](e[n(345)],e)})},this[e(485)]))}[co(489)](){return new Promise(t=>{const e=lo;this.on(e(273),()=>{t()})})}async[co(446)](){const t=co,e=this[t(472)][t(298)][t(378)](fr);if(this[t(458)]()&&(e[t(368)](),this[t(414)]=!1),!this[t(442)]())return!0;const n=[...this[t(268)]];for(const e of n)e[t(497)]=this[t(300)][t(463)][t(336)](e);const r=this[t(416)][t(409)](n),s=po++,o=this[t(349)](n),i=await this[t(316)][t(500)](o,o[t(407)],r);try{return await this[t(285)](n,i,s)}catch(e){return this[t(418)](t(337),e)}}async[co(285)](t,e,n){const r=co;if(r(302)in e)throw e[r(302)];let s=!1;if(e[r(440)]){e[r(348)]&&(this[r(274)]=e[r(348)]),this[r(268)]=this[r(268)][r(301)](e=>!t[r(278)](e));for(const n of t)n[r(484)]=r(421)in e&&e[r(421)]||void 0;mo(t,e[r(499)]-t[r(335)]),this[r(363)](t);const n=t[r(301)](t=>{const e=r;if(!t[e(277)])return!1;const n=this[e(477)](t);return n&&!this[e(388)][e(445)](n)});mo(n,this[r(300)][r(499)]),this[r(369)](n),s=!0,this[r(485)]=this[r(464)]}else{const t=this[r(476)](e[r(505)],e[r(332)])[r(301)](t=>t[r(407)]>=this[r(488)]);t[r(315)](t=>this[r(365)](t)),this[r(268)]=this[r(268)][r(301)](t=>!t[r(277)]||!this[r(388)][r(445)](this[r(477)](t))),this[r(268)][r(335)]&&mo(this[r(268)],this[r(268)][0][r(407)]),await this[r(375)](t),s=this[r(371)](t,e[r(499)],e[r(348)]),this[r(485)]=Math[r(493)](this[r(485)]/2)}return s?!this[r(442)]()||(this[r(284)](!0),!1):this[r(418)](r(263))}[co(371)](t,e,n){const r=co;try{const o={document:this[r(300)],useRelations:!1,padWithNoOps:!0},{operationsA:i,operationsB:a,originalOperations:c}=(0,s.transformOperationSets)(t,this[r(268)],o);mo(i,this[r(300)][r(499)]),mo(a,e);for(const t of i){const e=c[r(378)](t);t[r(397)]=e?e[r(397)]:null}n&&(this[r(416)][r(252)](t,n),this[r(274)]=n),this[r(268)]=[...a],this[r(369)](i),this[r(363)](t)}catch(t){return console[r(302)](t),!1}return!0}[co(369)](t,e=!1){const n=co;this[n(472)][n(246)][n(482)]({isUndoable:!1,isLocal:!1},e=>{const r=n;for(const n of t)this[r(342)][r(435)](n),this[r(365)](n),e[r(280)][r(438)](n),this[r(472)][r(246)][r(487)](n)})}[co(365)](t){const e=co,n=this[e(477)](t);n&&this[e(388)][e(435)](n)}[co(477)](t){const e=co;let n,r;switch(t[e(460)]){case e(256):n=t[e(282)][e(276)];break;case e(436):if(r=t[e(262)],!r)return null;n=r[e(276)];break;case e(457):n=t[e(276)];break;case e(424):n=t[e(249)];break;case e(454):n=t[e(432)][e(276)];break;default:return null}return n[e(327)]}[co(363)](t){const e=co;t[e(315)](t=>{const n=e,r=t[n(502)]();r[n(397)]=t[n(397)],r[n(277)]=!!t[n(277)],r[n(484)]=t[n(484)],r[n(407)]+=this[n(254)],t[n(272)]&&this[n(426)][n(435)](r),this[n(308)][n(438)](r)})}[co(495)](t){const e=co,n=this[e(472)][e(298)][e(378)](e(304)),r=this[e(472)][e(320)];t||(t=gr(r,e(417))),n[e(313)](t,{title:gr(r,e(334)),namespace:e(408)}),this[e(411)]=!0,clearTimeout(this[e(319)]),this[e(268)]=[],this[e(472)][e(298)][e(378)](Fn)[e(475)]()}[co(412)](){const t=co;this[t(357)]||(this[t(357)]=this[t(472)][t(298)][t(378)](e.PendingActions)[t(435)](gr(this[t(472)][t(320)],t(392))))}[co(423)](){const t=co;this[t(357)]&&(this[t(472)][t(298)][t(378)](e.PendingActions)[t(296)](this[t(357)]),this[t(357)]=null)}[co(349)](t){const e=co,n=t[e(340)](t=>t[e(309)]());return this[e(501)][e(376)](n)}[co(476)](t,e){const n=co;return this[n(501)][n(253)](t)[n(340)]((t,r)=>{const o=n,i=o(492)==e[r][o(460)];if(o(504)==t[o(396)]){const e=t[o(282)][o(276)];!this[o(300)][o(380)](e)&&(this[o(300)][o(384)](o(479),e)[o(428)]=!1)}const a=s.OperationFactory[o(288)](t,this[o(300)]);return a[o(497)]=t[o(497)],a[o(277)]=i,a[o(397)]=i?null:e[r][o(379)],a[o(272)]=o(311)===e[r][o(460)],a[o(484)]=e[r][o(484)],a})}[co(394)](){const t=co;this[t(414)]=!0,this[t(458)]()?this[t(284)]():this[t(414)]=!1}[co(458)](){const t=co,e=this[t(472)][t(298)][t(378)](Zn)[t(385)][t(378)](this[t(258)]);return!this[t(472)][t(328)]&&!!e&&e[t(335)]>1&&this[t(414)]}[co(442)](){const t=co;return this[t(268)][t(335)]>0||this[t(458)]()}}class fo extends Error{}function mo(t,e){const n=co;for(const r of t)r[n(407)]=e++}class go{[co(291)];[co(286)];constructor(t){const e=co;this[e(291)]=t,this[e(286)]=new WeakMap}[co(409)](t){const e=co;let r=t[e(335)];for(;r--;){const s=t[r];if(!this[e(291)][e(445)](s)){if(!this[e(286)][e(445)](s)){const t=(0,n.uid)()[e(398)](1,18);this[e(286)][e(248)](s,t)}return this[e(286)][e(378)](s)}}}[co(252)](t,e){const n=co;if(!e)return;let r=t[n(335)];for(;r--;){const s=t[r];this[n(291)][n(445)](s)||this[n(286)][n(248)](s,e)}}}var yo=Io;function bo(){var t=["457357jKQDpN","637287QoxktP","3853208zwIAfZ","551124eHXOkc","requires","12Aumldb","1344126QKqeSm","1300265FIUDmn","RealTimeCollaborativeEditing","isPremiumPlugin","pluginName","2346452iMByjQ","isOfficialPlugin"];return(bo=function(){return t})()}function Io(t,e){var n=bo();return(Io=function(t,e){return n[t-=277]})(t,e)}!function(t){for(var e=Io,n=t();;)try{if(847720===-parseInt(e(277))/1+parseInt(e(280))/2+parseInt(e(278))/3+parseInt(e(288))/4+-parseInt(e(284))/5*(-parseInt(e(282))/6)+parseInt(e(283))/7+-parseInt(e(279))/8)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(bo);class Oo extends e.Plugin{static get[yo(281)](){return[ho]}static get[yo(287)](){return yo(285)}static get[yo(289)](){return!0}static get[yo(286)](){return!0}}const vo=Ao;!function(t){const e=Ao,n=t();for(;;)try{if(871844===-parseInt(e(205))/1*(parseInt(e(166))/2)+-parseInt(e(200))/3+-parseInt(e(174))/4+-parseInt(e(130))/5+parseInt(e(156))/6+parseInt(e(133))/7*(-parseInt(e(207))/8)+parseInt(e(195))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(So);class wo extends e.ContextPlugin{static[vo(173)]=(()=>Gn)();[vo(172)];static get[vo(177)](){return[Fn,vo(194),Zn,Kn.Users]}static get[vo(221)](){return vo(206)}static get[vo(215)](){return!0}static get[vo(214)](){return!0}constructor(t){const e=vo;super(t),this[e(172)]=new Map}async[vo(164)](){const t=vo,n=this[t(135)],r=n[t(139)][t(183)](t(194));if(n[t(139)][t(183)](Fn)[t(201)](this),r[t(146)]={addCommentThread:async({channelId:e,threadId:n,comments:r,resolvedAt:s,resolvedBy:o,context:i,attributes:a})=>{const c=t,u=await this[c(132)](e)[c(125)]({commentThreadId:n,comments:r[c(161)](t=>function(t,e,n){const r=c;return{commentThreadId:n,commentId:t[r(152)],userId:t[r(127)],content:t[r(129)],documentId:e,createdAt:t[r(176)],attributes:t[r(209)]||{}}}(t,e,n)),resolvedAt:s,resolvedBy:o,context:i,attributes:a})[c(196)](To);return{threadId:u[c(199)],comments:u[c(154)]}},getCommentThread:async({channelId:e,threadId:n})=>{const r=t,s=await this[r(132)](e)[r(187)](n)[r(196)](ko)[r(196)](To);return s?s[r(179)]?null:(await this[r(165)]([s]),{threadId:s[r(199)],comments:s[r(154)][r(161)](_o),context:s[r(135)],resolvedAt:s[r(181)],resolvedBy:s[r(198)],attributes:s[r(209)]||{}}):null},updateCommentThread:async({channelId:e,threadId:n,context:r,unlinkedAt:s,attributes:o})=>this[t(132)](e)[t(216)]({commentThreadId:n,context:r,attributes:o,unlinkedAt:s})[t(196)](ko)[t(196)](To),resolveCommentThread:async({channelId:e,threadId:n})=>{const r=t,s=await this[r(132)](e)[r(157)](n)[r(196)](ko)[r(196)](To);return{threadId:s[r(199)],resolvedAt:s[r(181)],resolvedBy:s[r(198)]}},reopenCommentThread:async({channelId:e,threadId:n})=>this[t(132)](e)[t(163)](n)[t(196)](ko)[t(196)](To),removeCommentThread:({channelId:e,threadId:n})=>this[t(132)](e)[t(131)](n)[t(196)](ko)[t(196)](To),addComment:({channelId:e,threadId:n,commentId:r,content:s,attributes:o})=>this[t(132)](e)[t(162)](n,r,s,o)[t(196)](To),updateComment:({channelId:e,threadId:n,commentId:r,content:s,attributes:o})=>this[t(132)](e)[t(184)](n,r,s,o)[t(196)](ko)[t(196)](To),removeComment:({channelId:e,threadId:n,commentId:r})=>this[t(132)](e)[t(189)](n,r)[t(196)](ko)[t(196)](To)},n instanceof e.Context){const e=n[t(185)][t(183)](t(180)),r=n[t(139)][t(183)](Zn);await this[t(213)](e);const s=await this[t(172)][t(183)](e)[t(150)]();this[t(142)](r,t(147)+e,(n,{session:s})=>{const o=t;s.id===r[o(220)]&&(n[o(202)](),this[o(135)][o(139)][o(183)](o(191))[o(159)](s[o(188)],e))}),r[t(126)](e,s)}}async[vo(213)](t){const e=vo;if(this[e(172)][e(134)](t))throw new n.CKEditorError(e(143),null,{channelId:t});const r=this[e(135)][e(139)][e(183)](e(194)),s=new(wo[e(173)])(t);this[e(172)][e(124)](t,s),this[e(142)](s,e(145),(t,n)=>{const s=e,{commentThreadId:o,documentId:i,context:a,attributes:c,resolvedAt:u,resolvedBy:d,comments:l}=n;r[s(187)](o)||r[s(125)]({threadId:o,channelId:i,comments:l?l[s(161)](_o):[],context:a,attributes:c,resolvedAt:u,resolvedBy:d,isFromAdapter:!0})}),this[e(142)](s,e(222),(t,{commentThreadId:n,documentId:s,context:o,unlinkedAt:i,attributes:a})=>{const c=e;r[c(187)](n)&&r[c(216)]({threadId:n,channelId:s,context:o,unlinkedAt:i,attributes:a,isFromAdapter:!0})}),this[e(142)](s,e(151),(t,{commentThreadId:n,resolvedBy:s,resolvedAt:o})=>{const i=e,a=r[i(187)](n);a&&a[i(217)]({resolvedBy:s,resolvedAt:o,isFromAdapter:!0})}),this[e(142)](s,e(138),(t,{commentThreadId:n})=>{const s=e,o=r[s(187)](n);o&&o[s(170)]({isFromAdapter:!0})}),this[e(142)](s,e(178),(t,{commentThreadId:n})=>{const s=e,o=r[s(187)](n);o&&o[s(190)]({isFromAdapter:!0})}),this[e(142)](s,e(149),(t,n)=>{const s=e,o=n[s(199)],i=r[s(187)](o);i&&i[s(162)]({..._o(n),isFromAdapter:!0})}),this[e(142)](s,e(160),(t,{commentThreadId:n,commentId:s,content:o,attributes:i})=>{const a=e,c=r[a(187)](n);if(c){const t=c[a(192)](s);t&&t[a(128)]({content:o,attributes:i,isFromAdapter:!0})}}),this[e(142)](s,e(204),(t,{commentThreadId:n,commentId:s})=>{const o=e,i=r[o(187)](n);if(i){const t=i[o(192)](s);t&&t[o(190)]({isFromAdapter:!0})}}),await this[e(193)](t)}[vo(136)](){const t=vo;if(this[t(135)]instanceof e.Context){const e=this[t(135)][t(185)][t(183)](t(180));this[t(175)](e)}}[vo(175)](t){const e=vo;if(!this[e(172)][e(134)](t))throw new n.CKEditorError(e(137),null,{channelId:t});this[e(132)](t)[e(210)](),this[e(172)][e(203)](t)}async[vo(123)](){const t=vo;for(const e of this[t(172)][t(158)]())await this[t(193)](e);if(this[t(135)]instanceof e.Context){const e=this[t(135)][t(185)][t(183)](t(180)),n=this[t(135)][t(139)][t(183)](Zn);n[t(167)](e);const r=await this[t(172)][t(183)](e)[t(150)]();n[t(126)](e,r)}}async[vo(193)](t){const e=vo,{connection:n}=this[e(135)][e(139)][e(183)](Fn),r=this[e(135)][e(139)][e(183)](e(194)),s=this[e(172)][e(183)](t),o=await s[e(155)](n);await this[e(165)](o);const i=new Set(Array[e(140)](r[e(186)]({channelId:t}),t=>t.id));for(const t of o)t[e(179)]||i[e(203)](t[e(199)]);for(const t of i)r[e(187)](t)[e(190)]({isFromAdapter:!0});for(const n of o){let s=r[e(187)](n[e(199)]);const{commentThreadId:o,context:i,attributes:a,resolvedBy:c,resolvedAt:u,unlinkedAt:d,deletedAt:l}=n;if(l)continue;s||(s=r[e(125)]({channelId:t,threadId:o,context:i,attributes:a||{},resolvedBy:c,resolvedAt:u,unlinkedAt:d,isFromAdapter:!0}));const p=new Set(Array[e(140)](s[e(154)],t=>t.id));for(const t of n[e(154)])p[e(203)](t[e(152)]);for(const t of p)s[e(192)](t)[e(190)]({isFromAdapter:!0});for(const t of n[e(154)]){const n=s[e(192)](t[e(152)]);n?n[e(129)]!==t[e(129)]&&n[e(128)]({content:t[e(129)],isFromAdapter:!0}):s[e(162)](Object[e(223)](_o(t),{isFromAdapter:!0}))}}}[vo(132)](t){const e=vo;if(!this[e(172)][e(134)](t))throw new n.CKEditorError(e(148),null,{channelId:t});return this[e(172)][e(183)](t)}async[vo(165)](t){const e=vo,n=this[e(135)][e(139)][e(183)](Kn.Users),{connection:r}=this[e(135)][e(139)][e(183)](Fn),s=new Set;for(const{resolvedBy:r,comments:o}of t){r&&!n[e(219)](r)&&s[e(197)](r);for(const{userId:t}of o)n[e(219)](t)||s[e(197)](t)}if(0===s[e(182)])return;const o=await I[e(212)](r,Array[e(140)](s));for(const t of o)n[e(219)](t.id)||n[e(218)](t)}}function So(){const t=["1865944qiNmag","_terminateService","createdAt","requires","commentThreadRemoved","deletedAt","collaboration.channelId","resolvedAt","size","get","updateComment","config","getCommentThreads","getCommentThread","permissions","removeComment","remove","Permissions","getComment","_connectService","CommentsRepository","46341360eILGHT","catch","add","resolvedBy","commentThreadId","5074254NLOhrk","addToReconnectionStack","off","delete","commentRemoved","1231075qoOWWf","CloudServicesCommentsAdapter","88mztApB","cloud-services-internal-error: Comments Service is not connected.","attributes","disconnect","cloud-services-internal-error: Request timeout.","getMany","_setUpService","isPremiumPlugin","isOfficialPlugin","updateCommentThread","resolve","addUser","getUser","mySessionId","pluginName","commentThreadUpdated","assign","reconnect","set","addCommentThread","register","authorId","update","content","3871345AOlyyO","removeCommentThread","_getService","1038422IRIFpC","has","context","destroy","cloudservicescommentsadapter-disconnect-not-exist","commentThreadReopened","plugins","from","404","listenTo","cloudservicescommentsadapter-connect-already-connected","code","commentThreadAdded","adapter","sessionAdd:","cloudservicescommentsadapter-service-not-exist","commentAdded","getConnectedSessions","commentThreadResolved","commentId","startsWith","comments","connect","9107148JfBNxJ","resolveCommentThread","keys","setPermissions","commentUpdated","map","addComment","reopenCommentThread","init","_fetchMissingUsersForThreads","2vYeZGa","unregister","cloud-services-internal-error: Not connected.","message","reopen","userId","_services","CommentsService"];return(So=function(){return t})()}async function ko(t){const e=vo;if(e(141)!==t[e(144)])throw t}function Ao(t,e){const n=So();return(Ao=function(t,e){return n[t-=123]})(t,e)}function To(t){const e=vo;if((n=t)[e(169)][e(153)](e(208))||n[e(169)][e(153)](e(168))||n[e(169)][e(153)](e(211)))return new Promise(()=>{});var n;throw t}function _o(t){const e=vo;return{threadId:t[e(199)],commentId:t[e(152)],content:t[e(129)],createdAt:t[e(176)],authorId:t[e(171)],attributes:t[e(209)]||{}}}function Co(t,e){const n=Eo();return(Co=function(t,e){return n[t-=379]})(t,e)}const Po=Co;function Eo(){const t=["reconnect","add","type","CloudServicesTrackChangesAdapter","collaboration.channelId","adapter","delete","isPremiumPlugin","6467920RwNmwg","suggestionUpdated","message","attributes","_fetchMissingUsersForThreads","_trackChangesService","config","addUser","hasSuggestion","addSuggestionData","connect","size","_bufferedRequests","isOfficialPlugin","catch","90280UiWZSe","get","plugins","cloud-services-internal-error: Request timeout.","6318732PUReQn","396IAEhzM","find","1037LopqGa","_saved","connected","isConnected","TrackChangesEditing","404036XtTAUP","addToReconnectionStack","originalSuggestionId","values","264qEXpmI","editor","_waitForServiceReady","getMany","set","data","542ZagLye","55515DMvuuJ","update","12bAcJCM","state","getSuggestion","cloud-services-internal-error: Not connected.","12098031dmRpcv","TrackChangesService","off","startsWith","pluginName","getUser","connection","then","init","from","open","requires","listenTo"];return(Eo=function(){return t})()}!function(t){const e=Co,n=t();for(;;)try{if(662634===parseInt(e(381))/1*(-parseInt(e(396))/2)+-parseInt(e(399))/3*(parseInt(e(386))/4)+-parseInt(e(397))/5*(-parseInt(e(390))/6)+parseInt(e(443))/7+parseInt(e(439))/8*(-parseInt(e(379))/9)+-parseInt(e(424))/10+parseInt(e(403))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Eo);class jo extends e.Plugin{static[Po(404)]=(()=>Xe)();[Po(436)];[Po(429)];static get[Po(414)](){return[wo,Po(385),Fn]}static get[Po(407)](){return Po(419)}static get[Po(437)](){return!0}static get[Po(423)](){return!0}constructor(t){const e=Po;super(t);const n=this[e(391)][e(430)][e(440)](e(420));this[e(436)]=new Map,this[e(429)]=new(jo[e(404)])(n)}[Po(411)](){const t=Po,e=this[t(391)][t(441)][t(440)](Fn),n=this[t(391)][t(441)][t(440)](t(385));return n[t(421)]={getSuggestion:async e=>{const n=t;await this[n(392)]();const r=await this[n(429)][n(440)](e)[n(438)](Do);return await this[n(428)]([r]),r},addSuggestion:async({id:e,type:n,data:r,originalSuggestionId:s,attributes:o})=>{const i=t;await this[i(392)]();const a={id:e,type:n,data:r,originalSuggestionId:s,attributes:o},c=await this[i(429)][i(417)](e,n,r,s,o)[i(438)](t=>{if(xo(t))return new Promise(t=>{const n=Co;this[n(436)][n(394)](e,{resolve:t,suggestionData:a})});throw t});return this[i(436)][i(422)](e),c},updateSuggestion:async(e,n)=>{const r=t;if(await this[r(392)](),r(413)!==n[r(400)])return this[r(429)][r(398)](e,n)[r(438)](Do)}},this[t(415)](this[t(429)],t(425),(e,r)=>{const s=t;n[s(432)](r.id)&&(n[s(401)](r.id)[s(427)]=r[s(427)])}),this[t(429)][t(434)](e[t(409)])[t(410)](r=>(e[t(387)](this),this[t(428)](r)[t(410)](()=>{const e=t;for(const t of r)n[e(433)](t)[e(382)]=!0})))}async[Po(416)](){const t=Po,e=this[t(391)][t(441)][t(440)](t(385)),{connection:n}=this[t(391)][t(441)][t(440)](Fn),r=await this[t(429)][t(434)](n);await this[t(428)](r);for(const{suggestionData:e,resolve:n}of this[t(436)][t(389)]()){let s=r[t(380)](t=>t.id===e.id);s||(s=await this[t(429)][t(417)](e.id,e[t(418)],e[t(395)],e[t(388)])),n(s)}for(const n of r)e[t(432)](n.id)||e[t(433)](n)}async[Po(392)](){const t=Po;this[t(429)][t(384)]||await new Promise(e=>{const n=t;this[n(415)](this[n(429)],n(383),t=>{t[n(405)](),e()})})}async[Po(428)](t){const e=Po,n=this[e(391)][e(441)][e(440)](Kn.Users),{connection:r}=this[e(391)][e(441)][e(440)](Fn),s=new Set;for(const{authorId:r}of t)n[e(408)](r)||s[e(417)](r);if(0===s[e(435)])return;const o=await I[e(393)](r,Array[e(412)](s));for(const t of o)n[e(408)](t.id)||n[e(431)](t)}}function Do(t){if(xo(t))return new Promise(()=>{});throw t}function xo(t){const e=Po;return t[e(426)][e(406)](e(402))||t[e(426)][e(406)](e(442))}const Ro=Vo;!function(t){const e=Vo,n=t();for(;;)try{if(750919===parseInt(e(421))/1*(-parseInt(e(413))/2)+parseInt(e(407))/3+-parseInt(e(408))/4+-parseInt(e(412))/5+parseInt(e(405))/6*(parseInt(e(419))/7)+-parseInt(e(411))/8+parseInt(e(401))/9*(parseInt(e(415))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Mo);class No extends e.Plugin{static get[Ro(418)](){return[Ro(432),wo,Oo,Fn]}static get[Ro(429)](){return Ro(425)}static get[Ro(430)](){return!0}static get[Ro(414)](){return!0}[Ro(406)](){const t=Ro,e=this[t(417)][t(427)][t(423)](Fn),n=this[t(417)][t(427)][t(423)](t(422)),r=this[t(417)][t(427)][t(423)](wo);return this[t(417)][t(433)][t(409)](t(431),()=>{const r=t;this[r(426)](e,r(402),(t,e,s)=>{const o=r;n[o(403)]=o(410)!==s})}),this[t(426)](e,t(402),(e,n,r)=>{const s=t;this[s(417)][s(427)][s(423)](s(404))[s(424)](s(410)!==r)}),r[t(416)](this[t(417)][t(428)][t(423)](t(435)))}[Ro(434)](){const t=Ro;this[t(417)][t(427)][t(423)](wo)[t(420)](this[t(417)][t(428)][t(423)](t(435))),super[t(434)]()}}function Vo(t,e){const n=Mo();return(Vo=function(t,e){return n[t-=401]})(t,e)}function Mo(){const t=["isOfficialPlugin","ready","Comments","data","destroy","collaboration.channelId","1531971KmPXUu","change:state","isThreadsLoadingPaused","CommentsRepository","228nipask","init","3349110FHvMnF","5338664wkUhcg","once","connected","3426072hYsijM","2900540KSXfIw","455402tRMxaF","isPremiumPlugin","160SrJmbb","_setUpService","editor","requires","30373nZIAFR","_terminateService","4KCNVlZ","CommentsEditing","get","switchReadOnly","RealTimeCollaborativeComments","listenTo","plugins","config","pluginName"];return(Mo=function(){return t})()}var Bo=Jo;function Jo(t,e){var n=qo();return(Jo=function(t,e){return n[t-=382]})(t,e)}!function(t){for(var e=Jo,n=t();;)try{if(418742===-parseInt(e(386))/1+-parseInt(e(385))/2+parseInt(e(391))/3*(-parseInt(e(384))/4)+-parseInt(e(395))/5+parseInt(e(389))/6+parseInt(e(392))/7+parseInt(e(394))/8)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(qo);class Uo extends e.Plugin{static get[Bo(388)](){return[No,jo,Bo(382)]}static get[Bo(393)](){return Bo(387)}static get[Bo(390)](){return!0}static get[Bo(383)](){return!0}}function qo(){var t=["7711848XeaZmL","553480SFHHOz","TrackChanges","isPremiumPlugin","188dyRjJS","1422882INVCqC","236419VJgccY","RealTimeCollaborativeTrackChanges","requires","4961682EoNmhr","isOfficialPlugin","38931ytLTxb","2074023CzYarx","pluginName"];return(qo=function(){return t})()}const Lo=Yo;function Go(){const t=["creatorId","isPremiumPlugin","revisionsUpdated","addUser","_oldOffset","fromVersion","_revisionDataBuilder","toVersion","_revisions","diffData","affectsData","sendBufferedUpdates","7pKQnOr","_isConnected","once","length","1886SaKLBD","_lastRequestId","code","8FKJtfm","_offset","has","_preventResendingRevisionData","baseVersion","off","keys","pluginName","collaboration.channelId","_waitForServiceReady","authorsIds","currentRevision","requires","buildRevisionData","_fixRevision","marker","size","serverHistory","cloud-services-internal-error: Revision History Service is not connected.","5268843DParYA","then","startsWith","addToReconnectionStack","editor","get","getRevisions","setSource","_startingVersion","plugins","_getLatestVersionFromServerOperations","reInit","_fetchMissingUsers","_getLatestVersion","authors","message","remove","connect","RevisionHistory","destroy","isConnected","isBundleUploaded","2143578BnPCAX","sessionId","type","setRevisionData","isEmptyCurrent","1192372fccjQg","listenTo","CONNECTED","reverse","reconnect","createdAt","change:_isPendingUpdate","getOperations","wrongRequestId","isEnabled","getMany","state","_bufferUpdate","addRevisionData","400","_handleRevisionsUpdate","3543JyNhMA","_createCurrentRevision","_revisionHistoryService","adapter","3776755JCDhMg","getRevision","getUser","map","cloudServices.bundleVersion","RevisionHistoryService","repository","connection","RevisionTracker","31587000OVIHgo","_bufferedUpdates","from","init","isOfficialPlugin","_revisionTracker","_update","cloud-services-internal-error: Request timeout.","max","data","add","_isPendingUpdate","catch","config","cloud-services-internal-error: Not connected.","change:_isConnected","3002040hzaCcU","_handleReconnectionError","CloudServicesRevisionHistoryAdapter","bind","connected","updateRevisions"];return(Go=function(){return t})()}function Yo(t,e){const n=Go();return(Yo=function(t,e){return n[t-=109]})(t,e)}!function(t){const e=Yo,n=t();for(;;)try{if(881380===parseInt(e(169))/1+-parseInt(e(120))/2*(-parseInt(e(185))/3)+parseInt(e(214))/4+parseInt(e(189))/5+parseInt(e(164))/6*(-parseInt(e(116))/7)+-parseInt(e(123))/8*(-parseInt(e(142))/9)+-parseInt(e(198))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Go);class Ho extends e.Plugin{static[Lo(194)]=(()=>Me)();[Lo(121)];[Lo(203)];[Lo(187)];[Lo(224)];static get[Lo(135)](){return[Fn,ho,Lo(160),Zn,Kn.Users]}static get[Lo(130)](){return Lo(216)}static get[Lo(202)](){return!0}static get[Lo(221)](){return!0}constructor(t){const e=Lo;super(t);const n=this[e(146)][e(211)][e(147)](e(131));this[e(121)]=null,this[e(203)]=this[e(146)][e(151)][e(147)](e(197)),this[e(187)]=new(Ho[e(194)])(n)}async[Lo(201)](){const t=Lo,e=this[t(146)][t(151)][t(147)](ho),r=e[t(140)],s=this[t(146)][t(151)][t(147)](Fn);this[t(203)][t(149)]({history:r,getLatestVersion:()=>this[t(155)](),getCurrentRevisionId:()=>e[t(165)]});const o=this[t(146)][t(211)][t(147)](t(193))||n.version,i=await Te[t(163)](s[t(196)],o);this[t(146)][t(151)][t(147)](t(160))[t(188)]={getRevision:async({revisionId:e})=>(await this[t(132)](),await this[t(187)][t(190)](e)),updateRevisions:async e=>{const n=t;await this[n(132)]();const r=this[n(203)][n(134)];if(i&&1===e[n(119)]&&e[0].id===r.id)return e;for(const t of e)t.id===r.id&&(t[n(168)]=t[n(109)]===t[n(111)]);return this[n(187)][n(219)](e,this[n(121)])[n(143)](t=>(this[n(121)]=t,e))[n(210)](t=>{const r=n;if(zo(t)||r(183)===t[r(122)]&&void 0!==t[r(207)][r(177)]){for(const t of e)!this[r(203)][r(195)][r(190)](t.id)||this[r(203)][r(181)](t.id,t,!1);if(zo(t))throw t;return e}throw t})}},this[t(170)](this[t(187)],t(222),(e,{revisionsData:n,requestId:r})=>{const s=t;Math[s(206)](...n[s(192)](t=>t[s(111)]))>this[s(152)]()-1?this[s(155)]()[s(143)](()=>{this[s(184)](n,r)}):this[s(184)](n,r)});const{revisions:a,requestId:c}=await this[t(187)][t(159)](s[t(196)]);s[t(145)](this),this[t(121)]=c,await this[t(154)](a);for(const e of a)this[t(203)][t(182)](e);this[t(170)](e,t(213),(n,r,s)=>{const o=t;s&&(this[o(224)]=e[o(124)],n[o(128)]())}),this[t(203)][t(217)](t(178)).to(s,t(180),e=>e===Oe[t(171)])}async[Lo(173)](){const t=Lo,e=this[t(146)][t(151)][t(147)](Fn),n=this[t(146)][t(151)][t(147)](ho),r=async()=>{const r=t,s=this[r(203)][r(134)],o=s.id,i=o!==n[r(165)];if(i){const t=n[r(124)]-this[r(224)],e=this[r(152)]();if(this[r(203)][r(110)][r(153)](),s[r(111)]+t!==e){const n=s[r(109)]+t,o=this[r(146)][r(151)][r(147)](Kn.Users),i=this[r(203)][r(136)]({revision:s,from:n,to:e});i.id=s.id;const a=i[r(133)][r(192)](t=>o[r(191)](t));s[r(204)]({...i,authors:a},!0),this[r(203)][r(181)](s.id,i,!0)}this[r(203)][r(150)]=e,s[r(111)]===s[r(109)]&&!this[r(203)][r(199)][r(125)](o)&&this[r(203)][r(195)][r(112)][r(158)](o),this[r(203)][r(186)](e)}const{revisions:a,requestId:c}=await this[r(187)][r(173)](e[r(196)],this[r(121)]);i&&a[r(119)]>0?n[r(215)]():(await this[r(154)](a),this[r(184)](a,c),this[r(203)][r(115)]())};return n[t(117)]?r():new Promise((e,s)=>{const o=t;n[o(118)](o(213),()=>{const t=o;r()[t(143)](e)[t(210)](s)})})}[Lo(161)](){super[Lo(161)]()}async[Lo(132)](){const t=Lo;this[t(187)][t(162)]||await new Promise(e=>{const n=t;this[n(170)](this[n(187)],n(218),t=>{t[n(128)](),e()})})}[Lo(152)](){const t=Lo,e=this[t(146)][t(151)][t(147)](ho)[t(140)][t(176)]()[t(172)]();for(const n of e)if(t(138)!==n[t(166)]||n[t(114)])return n[t(127)]+1}[Lo(155)](){const t=Lo,e=this[t(146)][t(151)][t(147)](ho);return new Promise(n=>{const r=t;e[r(209)]?e[r(118)](r(175),()=>{n(this[r(152)]())}):n(this[r(152)]())})}[Lo(184)](t,e){const n=Lo,r=this[n(203)][n(195)];this[n(121)]=e;for(const e of t){const t=r[n(190)](e.id);if(t){if((e[n(109)]||e[n(111)])&&(e[n(113)]=null),t===this[n(203)][n(134)]){const r=Math[n(206)](t[n(111)],e[n(111)]),s=Math[n(206)](t[n(109)],e[n(109)]);let o;t[n(111)]===e[n(111)]&&t[n(109)]===e[n(109)]?(o=!0,this[n(126)](e)):e[n(111)]===r&&e[n(109)]===s?o=!1:(t[n(111)]===r&&t[n(109)]===s||this[n(137)]({revision:t,from:s,to:r}),o=!0),o&&(delete e[n(109)],delete e[n(111)],delete e[n(113)],delete e[n(174)],delete e[n(133)])}this[n(203)][n(167)](e),this[n(126)](e)}else this[n(203)][n(182)](e)}const s=r[n(148)]();s[n(172)]();for(let t=0;t<s[n(119)]-1;t++){const e=s[t],r=s[t+1];if(e[n(109)]<r[n(111)]){const t=r[n(111)],s=Math[n(206)](t,e[n(111)]);this[n(137)]({revision:e,from:t,to:s})}}}[Lo(137)]({revision:t,from:e,to:n}={}){const r=Lo,s=this[r(146)][r(151)][r(147)](Kn.Users),o=this[r(203)][r(136)]({revision:t,from:e,to:n});o[r(156)]=o[r(133)][r(192)](t=>s[r(191)](t)),t[r(204)](o)}[Lo(126)](t){const e=Lo,n={};n.id=t.id;for(const r of Object[e(129)](t))"id"!==r&&(n[r]=void 0);this[e(203)][e(181)](n.id,n,!0)}async[Lo(154)](t){const e=Lo,n=this[e(146)][e(151)][e(147)](Kn.Users),{connection:r}=this[e(146)][e(151)][e(147)](Fn),s=new Set;for(const n of t){for(const t of n[e(133)])i(t);n[e(220)]&&i(n[e(220)])}if(0===s[e(139)])return;const o=await I[e(179)](r,Array[e(200)](s));for(const t of o)n[e(191)](t.id)||n[e(223)](t);function i(t){const r=e;n[r(191)](t)||s[r(208)](t)}}}function zo(t){const e=Lo;return t[e(157)][e(144)](e(141))||t[e(157)][e(144)](e(212))||t[e(157)][e(144)](e(205))}function Fo(t,e){var n=Ko();return(Fo=function(t,e){return n[t-=470]})(t,e)}function Ko(){var t=["117AvCcdG","isOfficialPlugin","21CItvlx","isPremiumPlugin","260782lmBicg","requires","4506fQpKzb","5866TRHcCg","pluginName","794960dEouVR","84950cQKLSR","10017528oadaNL","11870IFBLZP","RevisionHistory","480XdBfBC","RealTimeCollaborativeRevisionHistory","14280068HNBjqf"];return(Ko=function(){return t})()}var Wo=Fo;!function(t){for(var e=Fo,n=t();;)try{if(995976===-parseInt(e(470))/1+parseInt(e(481))/2*(-parseInt(e(479))/3)+parseInt(e(474))/4*(parseInt(e(472))/5)+-parseInt(e(483))/6*(-parseInt(e(484))/7)+-parseInt(e(471))/8+-parseInt(e(477))/9*(-parseInt(e(486))/10)+parseInt(e(476))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ko);class Qo extends e.Plugin{static get[Wo(482)](){return[Wo(473),Ho,Oo]}static get[Wo(485)](){return Wo(475)}static get[Wo(478)](){return!0}static get[Wo(480)](){return!0}}function Xo(t){return function(t){return"object"==typeof t&&null!==t}(t)&&1===t.nodeType&&!function(t){if("object"!=typeof t)return!1;if(null==t)return!1;if(null===Object.getPrototypeOf(t))return!0;if("[object Object]"!==Object.prototype.toString.call(t)){const e=t[Symbol.toStringTag];return null!=e&&(!!Object.getOwnPropertyDescriptor(t,Symbol.toStringTag)?.writable&&t.toString()===`[object ${e}]`)}let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}(t)}const Zo=ti;function $o(){const t=["2pZGkcB","410003tsjEBQ","ck-presence-list__users-counter__text","setTemplate","bindTemplate","ck-presence-list__list-item","1400yehamA","4Lurotl","64729Srpbqn","66GZOeFI","1225257JZFqsi","_collapseAt","isHidden","set","4135914RbvWkt","ck-presence-list__users-counter","6145104gKTWKt","div","8735585CPAYBM","listitem","bind","toString","ck-presence-list__counter--hidden","usersCount","143895yDtmZJ"];return($o=function(){return t})()}function ti(t,e){const n=$o();return(ti=function(t,e){return n[t-=470]})(t,e)}!function(t){const e=ti,n=t();for(;;)try{if(964410===-parseInt(e(493))/1+-parseInt(e(483))/2*(-parseInt(e(482))/3)+parseInt(e(490))/4*(-parseInt(e(476))/5)+parseInt(e(492))/6*(-parseInt(e(491))/7)+-parseInt(e(474))/8+-parseInt(e(472))/9+-parseInt(e(489))/10*(-parseInt(e(484))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}($o);class ei extends r.View{[Zo(494)];constructor(t,e=6){const n=Zo;super(t);const r=this[n(487)];this[n(471)](n(470),!0),this[n(471)](n(481),0),this[n(494)]=e,this[n(478)](n(470)).to(this,n(481),t=>t<e),this[n(486)]({tag:n(475),attributes:{class:["ck",n(488),r.if(n(470),n(480))],role:n(477)},children:[{tag:n(475),attributes:{class:["ck",n(473)]},children:[{tag:n(475),attributes:{class:["ck",n(485)]},children:[{text:r.to(n(481),t=>"+"+(t-this[n(494)]+2)[n(479)]())}]}]}]})}}const ni=si;function ri(){const t=["change:hasPopup",".ck-balloon-panel_with-arrow","set","bindTemplate","27jBSsJg","Connected users list","aria-expanded","listenTo","contains","items","setAttribute","1938435BEYzaf","ck-presence-list__list","list","keystrokes","fire","presencelist:hide","Collapsed connected users list (press ENTER to open it)","isExpanded","26229CeFXaA","setTemplate","presencelist:show","927880hTSZgG","relatedTarget",".ck-presence-list__dropdown-list","div","focus","6044610sRWbnJ","hasPopup","2056pTZWZt","removeAttribute","render","1392301FvfEtU","createCollection","querySelector","543516LebzQR","25187229MpOrxj","element"];return(ri=function(){return t})()}function si(t,e){const n=ri();return(si=function(t,e){return n[t-=409]})(t,e)}!function(t){const e=si,n=t();for(;;)try{if(712714===parseInt(e(438))/1+parseInt(e(428))/2+parseInt(e(410))/3*(parseInt(e(441))/4)+parseInt(e(417))/5+parseInt(e(433))/6+parseInt(e(425))/7*(-parseInt(e(435))/8)+-parseInt(e(442))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ri);class oi extends r.View{[ni(415)];[ni(420)];constructor(t){const e=ni;super(t);const r=this[e(409)];this[e(415)]=this[e(439)](),this[e(420)]=new n.KeystrokeHandler,this[e(446)]({hasPopup:!1,isExpanded:!1}),this[e(426)]({tag:e(431),attributes:{"aria-haspopup":r.if(e(434)),"aria-expanded":r.to(e(424),t=>this[e(434)]&&String(t)),"aria-label":r.to(e(434),n=>gr(t,e(n?423:411))),role:e(419),tabindex:r.to(e(434),t=>!!t&&0),class:["ck",e(418)]},children:this[e(415)],on:{mouseenter:r.to(()=>this[e(421)](e(427))),mouseleave:r.to(t=>{const n=e,r=t,s=document[n(440)](n(430)),o=document[n(440)](n(445));s?.[n(414)](r[n(429)])||o?.[n(414)](r[n(429)])||this[n(421)](n(422))})}}),this.on(e(444),(t,n,r)=>{const s=e;this[s(443)]&&(r?this[s(443)][s(416)](s(412),String(this[s(424)])):this[s(443)][s(436)](s(412)))})}[ni(432)](){const t=ni;this[t(443)][t(432)]()}[ni(437)](){const t=ni;super[t(437)](),this[t(420)][t(413)](this[t(443)])}}var ii=__webpack_require__(144),ai={attributes:{"data-cke":!0}};ai.setAttributes=ir(),ai.insert=sr().bind(null,"head"),ai.domAPI=nr(),ai.insertStyleElement=cr();tr()(ii.A,ai);ii.A&&ii.A.locals&&ii.A.locals;const ci=di;function ui(){const t=["30gNgKnH","first","locale","change","1016bCygYJ","counterView","listenTo","items","bindTemplate","77drYYix","5569416nXFYrt","div","11874YkwCsw","bind","574736hjpvpX","inlineListView","setTemplate","tooltipPosition","712265AvMPVO","ck-presence-list","2780760vXqFmS","ck-presence-list--collapsed","3898697kJUcxq","set","isCollapsed","ck-rounded-corners","2427CLEUfp","27AZnMYV","ck-reset","hasPopup"];return(ui=function(){return t})()}function di(t,e){const n=ui();return(di=function(t,e){return n[t-=164]})(t,e)}!function(t){const e=di,n=t();for(;;)try{if(583619===-parseInt(e(193))/1*(-parseInt(e(178))/2)+parseInt(e(192))/3*(-parseInt(e(170))/4)+-parseInt(e(184))/5+-parseInt(e(186))/6+parseInt(e(175))/7*(parseInt(e(180))/8)+-parseInt(e(176))/9+parseInt(e(166))/10*(parseInt(e(188))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ui);class li extends r.View{[ci(171)];[ci(181)];constructor(t,e=6){const n=ci;super(t);const r=this[n(174)];this[n(189)](n(190),!0),this[n(171)]=new ei(this[n(168)],e),this[n(181)]=new oi(t),this[n(181)][n(179)](n(165)).to(this,n(190)),this[n(172)](this[n(181)][n(173)],n(169),()=>{const t=n;for(const e of this[t(181)][t(173)])e[t(183)]="s";this[t(181)][t(173)][t(167)]&&(this[t(181)][t(173)][t(167)][t(183)]="se")}),this[n(182)]({tag:n(177),attributes:{class:["ck",n(185),n(164),n(191),r.if(n(190),n(187))]},children:[this[n(181)]]})}}const pi=hi;function hi(t,e){const n=fi();return(hi=function(t,e){return n[t-=100]})(t,e)}function fi(){const t=["listWrapperView","bindTemplate","div","change","querySelector","7518MDXVwg","resize","max","scrollHeight","Connected users list dropdown menu","ck-presence-list__dropdown-list","47HmOgaT","checkIfScrollable","ariaLabelledBy","fire","presencelist:hide","ariaLabel","items","innerHeight",".ck-balloon-panel_with-arrow","set","490tozsNr","ck-reset","48mjTaoU","5tgrMsk","24311HyJSyY",".ck-presence-list__list","clientHeight","application","745980DWkVVl","3194675aQwcAx","listenTo","element","1406416LwVXVL","ck-list","setTemplate","render","105882rRlSxB","_isScrollable","ck-presence-list__dropdown-list-wrapper","window","relatedTarget","11133RVUlKk","ck-presence-list__dropdown-list-wrapper_scrollable","role","contains"];return(fi=function(){return t})()}!function(t){const e=hi,n=t();for(;;)try{if(100594===-parseInt(e(108))/1*(parseInt(e(102))/2)+-parseInt(e(134))/3+-parseInt(e(126))/4*(parseInt(e(121))/5)+parseInt(e(120))/6*(-parseInt(e(122))/7)+parseInt(e(130))/8+-parseInt(e(139))/9*(-parseInt(e(118))/10)+parseInt(e(127))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(fi);class mi extends r.View{[pi(143)];constructor(t,e){const n=pi;super(t);const r=this[n(144)];this[n(143)]=new gi(t,e),this[n(132)]({tag:n(145),attributes:{tabindex:-1,role:n(125),class:["ck",n(107)],"aria-label":gr(t,n(106))},children:[this[n(143)]],on:{mouseleave:r.to(t=>{const e=n,r=t,s=document[e(101)](e(123)),o=document[e(101)](e(116));s?.[e(142)](r[e(138)])||o?.[e(142)](r[e(138)])||this[e(111)](e(112))})}})}}class gi extends r.ListView{constructor(t,e){const r=pi;super(t);const s=this[r(144)];this[r(117)](r(135),!1),this[r(132)]({tag:e?r(145):"ul",attributes:{class:["ck",r(119),r(131),r(136),s.if(r(135),r(140))],role:s.to(r(141)),"aria-label":s.to(r(113)),"aria-labelledby":s.to(r(110))},children:this[r(114)]}),this[r(128)](n.global[r(137)],r(103),()=>this[r(109)]()),this[r(114)].on(r(100),()=>this[r(109)]())}[pi(133)](){const t=pi;super[t(133)](),this[t(109)]()}[pi(109)](){const t=pi,e=this[t(129)];e&&(this[t(135)]=Math[t(104)](e[t(105)],e[t(124)])>.8*window[t(115)])}}const yi=bi;function bi(t,e){const n=Ii();return(bi=function(t,e){return n[t-=182]})(t,e)}function Ii(){const t=["ck-user__full-name","3610256MlXkJd","span","focus","presentation","name","1117839sKOQSn","true","33738fyVrye","color","635uePLRJ","5620951VwQEBI","button","ck-presence-list__marker","userView","element","execute","getBackgroundColorClass","bindTemplate","setTemplate","9226782OzFtld","4EJibNr","tag","880992RBBiWs","121954DloYTq","fire","ck-presence-list__dropdown-list-item"];return(Ii=function(){return t})()}!function(t){const e=bi,n=t();for(;;)try{if(430973===-parseInt(e(189))/1+parseInt(e(188))/2+parseInt(e(198))/3*(-parseInt(e(186))/4)+-parseInt(e(202))/5*(-parseInt(e(200))/6)+-parseInt(e(203))/7+-parseInt(e(193))/8+parseInt(e(185))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ii);class Oi extends r.ListItemView{[yi(206)];constructor(t,e,n){const r=yi;super(t);const s=this[r(183)];this[r(206)]=new Kn.UserView(t,e);const o={tag:"li",attributes:{class:["ck",r(191)],tabindex:-1,role:r(196),"aria-label":e[r(197)]},children:[this[r(206)],{tag:r(194),attributes:{class:["ck",r(192)]},children:[{text:e[r(197)]}]},{tag:r(194),attributes:{class:["ck",r(205),e[r(201)][r(182)]()],"aria-hidden":r(199)}}]};n&&(o[r(187)]=r(204),o.on={click:s.to(()=>this[r(190)](r(208)))}),this[r(184)](o)}[yi(195)](){const t=yi;this[t(207)][t(195)]()}}function vi(){const t=["tooltipPosition","5205222GNOzPk","getBackgroundColorClass","tag","color","div","isFocusable","userView","454zNpKJM","template","5dQCyfM","ck-presence-list__list-item","listitem","setTemplate","hasTooltip","152556mjzgXD","2786WSodBe","set","execute","true","ck-presence-list__marker","markerView","fire","481792eKDDWP","3298564VNRxqi","button","name","bindTemplate","text","12212330NUdlKO","span","9096lcheQq","14796oPIenW","ck-presence-list__list-item__tooltip"];return(vi=function(){return t})()}const wi=Si;function Si(t,e){const n=vi();return(Si=function(t,e){return n[t-=266]})(t,e)}!function(t){const e=Si,n=t();for(;;)try{if(589414===-parseInt(e(285))/1+-parseInt(e(278))/2*(-parseInt(e(267))/3)+parseInt(e(294))/4*(-parseInt(e(280))/5)+-parseInt(e(268))/6*(parseInt(e(286))/7)+parseInt(e(293))/8+parseInt(e(271))/9+parseInt(e(299))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(vi);class ki extends r.View{[wi(277)];[wi(291)];constructor(t,e,n){const s=wi;super(t);const o=this[s(297)];this[s(287)](s(276),!1),this[s(287)](s(284),!0),this[s(287)](s(270),""),this[s(277)]=new Kn.UserView(t,e),this[s(291)]=new Ai(t,e);const i=new r.LabelView(t);i[s(279)][s(273)]=s(266),i[s(298)]=e[s(296)];const a={tag:s(275),attributes:{class:["ck",s(281)],role:s(282),tabindex:o.to(s(276),t=>!!t&&0),"aria-labelledby":i.id,"data-cke-tooltip-text":this[s(277)][s(296)],"data-cke-tooltip-position":o.to(s(270)),"data-cke-tooltip-disabled":o.to(s(284),t=>!t),"data-cke-tooltip-class":s(269)},children:[this[s(277)],this[s(291)],i]};n&&(a[s(273)]=s(295),a.on={click:o.to(()=>this[s(292)](s(288)))}),this[s(283)](a)}}class Ai extends r.View{constructor(t,e){const n=wi;super(t),this[n(283)]({tag:n(266),attributes:{class:["ck",n(290),e[n(274)][n(272)]()],"aria-hidden":n(289)}})}}const Ti=Pi;function _i(){const t=["presencelist-missing-container","isFocusable","activeElement","join","requires","querySelectorAll","_bodyCollection","button","isCollapsed","75hUgZtZ","element","ck ck-presence-list__balloon","sort","appendChild","[tabindex]","[contenteditable]","locale","56XhewSr","presenceDropdownView","isRendered",':not([disabled]):not([tabindex="-1"])',"unpin","change:isFocused","1215lBGEqT","Enter","_handleUserRemove","hideDropdown","offsetHeight","Shift+Tab","filter","add","_createView","textarea","view","76730cAeCDK","items","2236768RJQsAe","onClick","bind","presenceList.collapseAt","keystrokes","checkIfScrollable","882264lumJxP","tabIndex","attachToDom","focusTracker","content","set","remove","14371NOcWIp","hasTooltip","select","render","presencelist:hide","offsetWidth","config","bindTo","min","from","init","execute","pluginName","destroy","length","presencelist:show","presenceList.displayMe","usersCount","Esc","pin","isVisible","203664NTkuTO","636897eHRKdj","listenTo","inlineListView","number","body","isMe","counterView","showDropdown","_handleUserAdd","context","reverse","currentDisplayedUsers","plugins","get","find","Tab","287254qNRPda","define","_allConnectedUsers","isOfficialPlugin","isExpanded","balloonPanelView","input","displayMe","detachFromDom","map","class","focus","indexOf","isPremiumPlugin","PresenceListUI","using","allConnectedUsers","presenceList","presencelist-collapseat-invalid-format","presenceList.container"];return(_i=function(){return t})()}!function(t){const e=Pi,n=t();for(;;)try{if(504562===parseInt(e(414))/1+parseInt(e(430))/2+-parseInt(e(385))/3+parseInt(e(379))/4+-parseInt(e(352))/5*(-parseInt(e(413))/6)+parseInt(e(392))/7*(-parseInt(e(360))/8)+parseInt(e(366))/9*(-parseInt(e(377))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(_i);const Ci={collapseAt:6,displayMe:!0};function Pi(t,e){const n=_i();return(Pi=function(t,e){return n[t-=326]})(t,e)}class Ei extends e.ContextPlugin{[Ti(425)];[Ti(328)];[Ti(376)];[Ti(361)];[Ti(349)]=null;static get[Ti(404)](){return Ti(337)}static get[Ti(326)](){return!0}static get[Ti(336)](){return!0}constructor(t){const e=Ti;super(t),this[e(423)][e(398)][e(431)](e(340),Ci);const s=t[e(398)][e(427)](e(382));if(e(417)!=typeof s)throw new n.CKEditorError(e(341),this);if(s<1)throw new n.CKEditorError(e(341),this);this[e(432)]=this[e(423)][e(426)][e(427)](Zn)[e(339)],this[e(390)](e(409),0),this[e(425)]=new n.Collection,this[e(328)]=new r.BalloonPanelView,this[e(328)][e(333)]=e(354),this[e(376)]=this[e(374)](),this[e(361)]=void 0}static get[Ti(347)](){return[Zn]}[Ti(402)](){const t=Ti;for(const e of this[t(432)])this[t(422)](e);this[t(415)](this[t(432)],t(373),(e,n)=>{this[t(422)](n)}),this[t(415)](this[t(432)],t(391),(e,n)=>{this[t(368)](n)})}[Ti(374)](){const t=Ti,e=this[t(423)],s=new li(this[t(423)][t(359)],this[t(423)][t(398)][t(427)](t(382))),o=this[t(328)];if(!Xo(e[t(398)][t(427)](t(342))))throw new n.CKEditorError(t(343),this);return s[t(420)][t(381)](t(409)).to(this),s[t(381)](t(351)).to(this,t(409),n=>{const r=t,{collapseAt:o}=e[r(398)][r(427)](r(340)),i=n>=o;if(i&&!s[r(416)][r(378)][r(428)](t=>t instanceof ei)){const t=this[r(423)][r(398)][r(427)](r(382))-1;this[r(425)][r(406)]==t&&this[r(425)][r(406)]>1&&this[r(425)][r(391)](this[r(425)][r(406)]-1),s[r(416)][r(378)][r(373)](s[r(420)])}return i||this[r(369)](),i}),s[t(416)][t(378)][t(399)](this[t(425)])[t(338)](n=>{const r=t,o=e[r(398)][r(427)](r(340)),i=new ki(e[r(359)],n,!!o[r(380)]);return i[r(381)](r(393)).to(s,r(351),t=>!t),i[r(381)](r(344)).to(s,r(351),t=>!t),o[r(380)]&&this[r(415)](i,r(403),()=>{const t=r;this[t(376)][t(351)]||o[t(380)](n,i[t(353)])}),i}),this[t(415)](s[t(416)],t(407),()=>{const e=t;this[e(376)][e(351)]&&this[e(421)]()}),this[t(415)](s[t(416)],t(396),()=>{const e=t;this[e(361)]&&this[e(369)]()}),s[t(416)][t(383)][t(390)](t(367),(e,n)=>{const r=t;this[r(376)][r(351)]&&(this[r(421)](),n())}),s[t(395)](),o[t(395)](),(0,r.clickOutsideHandler)({emitter:s,activator:()=>o[t(412)],contextElements:[o[t(353)],s[t(416)][t(353)]],callback:()=>this[t(369)]()}),e[t(398)][t(427)](t(342))[t(356)](s[t(353)]),this[t(349)]=new r.BodyCollection(this[t(423)][t(359)]),this[t(349)][t(387)](),this[t(349)][t(373)](this[t(328)]),s}[Ti(422)](t){const e=Ti;if(!this[e(423)][e(398)][e(427)](e(408))&&t[e(419)])return;const n=this[e(423)][e(398)][e(427)](e(382))-1;for(this[e(409)]++;this[e(425)][e(406)]>=n-(this[e(376)][e(351)]?1:0)&&this[e(425)][e(406)]>1;)this[e(425)][e(391)](1);const r=t[e(419)]?0:this[e(425)][e(406)];this[e(425)][e(373)](t,r)}[Ti(368)](t){const e=Ti;this[e(409)]--;const{collapseAt:n}=this[e(423)][e(398)][e(427)](e(340)),r=this[e(409)]>=n;if(this[e(425)][e(427)](t.id))this[e(425)][e(391)](t.id);else if(r&&this[e(425)][e(406)]+1===n-1)return;if(this[e(425)][e(406)]+(r?1:0)<this[e(409)])for(const t of Array[e(401)](this[e(432)])[e(424)]())if(!this[e(425)][e(427)](t.id)&&(this[e(425)][e(373)](t,Math[e(400)](this[e(425)][e(406)]-(r?1:0),1)),this[e(425)][e(406)]+(r?1:0)===n-1))return}[Ti(421)](){const t=Ti;if(this[t(361)])return;const e=this[t(423)][t(398)][t(427)](t(340));this[t(361)]=new mi(this[t(423)][t(359)],!!e[t(380)]),this[t(376)][t(416)][t(327)]=!0,this[t(415)](this[t(361)],t(396),()=>{const e=t;this[e(361)]&&this[e(369)]()});const{listWrapperView:n}=this[t(361)];n[t(378)][t(399)](this[t(432)])[t(338)](n=>{const r=t;if(!e[r(330)]&&n[r(419)])return null;const s=new Oi(this[r(423)][r(359)],n,!!e[r(380)]);return e[r(380)]&&this[r(415)](s,r(403),()=>{const t=r;e[t(380)](n,s[t(353)])}),s}),this[t(328)][t(389)][t(373)](this[t(361)]),this[t(328)][t(411)]({target:this[t(376)][t(416)][t(353)]}),n[t(334)](),n[t(384)]();const r=(e,n)=>{const r=t;this[r(369)](),this[r(376)][r(416)][r(334)](),n()};n[t(383)][t(390)](t(410),r),n[t(383)][t(390)](t(371),r),n[t(383)][t(390)](t(429),(e,n)=>{const r=t;!function(t){const e=Pi,n=["a",e(350),e(329),e(394),e(375),e(357),e(358)][e(332)](t=>t+e(363))[e(346)](","),r=[...document[e(418)][e(348)](n)][e(372)](t=>t===document[e(345)]||t[e(397)]+t[e(370)]>0)[e(355)]((t,n)=>(t[e(386)]||0)-(n[e(386)]||0)),s=r[e(335)](t),o=r[(s+1)%r[e(406)]];o&&o[e(334)]()}(this[r(376)][r(353)]),this[r(369)](),n()}),n[t(388)][t(373)](this[t(376)][t(353)]),n[t(388)].on(t(365),(e,n,r)=>{r||this[t(369)]()})}[Ti(369)](){const t=Ti;this[t(361)]&&(this[t(376)][t(416)][t(327)]=!1,this[t(328)][t(364)](),this[t(328)][t(389)][t(391)](this[t(361)]),this[t(361)][t(405)](),this[t(361)]=void 0)}[Ti(405)](){const t=Ti;super[t(405)](),this[t(376)]&&this[t(376)][t(362)]&&this[t(376)][t(405)](),this[t(349)]&&(this[t(349)][t(331)](),this[t(349)][t(405)](),this[t(349)]=null)}}var ji=Di;function Di(t,e){var n=xi();return(Di=function(t,e){return n[t-=461]})(t,e)}function xi(){var t=["1597050BbTiXv","1041968gSztPo","pluginName","isPremiumPlugin","requires","isOfficialPlugin","670514MNipfi","49744aADnSy","5nmhmCC","881982VtlPyX","2241DTjzEp","PresenceList","356307HdqyZA","1580136JSkAGf"];return(xi=function(){return t})()}!function(t){for(var e=Di,n=t();;)try{if(189274===parseInt(e(465))/1+parseInt(e(473))/2+parseInt(e(462))/3+parseInt(e(468))/4*(parseInt(e(461))/5)+parseInt(e(466))/6+parseInt(e(467))/7+-parseInt(e(474))/8*(parseInt(e(463))/9))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(xi);class Ri extends e.ContextPlugin{static get[ji(471)](){return[Zn,Ei]}static get[ji(469)](){return ji(464)}static get[ji(472)](){return!0}static get[ji(470)](){return!0}}function Ni(){var t=["305965ebVVKU","17811dsYPEu","280eAozek","10927nYcFVO","1379304mQcMQt","16vrMPlG","360NGSkwd","14599OaAeca","4575205TvIoKA","2724amQPCa","4zLoqXv","2292UJRpVQ","7741jYBElL"];return(Ni=function(){return t})()}function Vi(t,e){var n=Ni();return(Vi=function(t,e){return n[t-=115]})(t,e)}!function(t){for(var e=Vi,n=t();;)try{if(786387===-parseInt(e(125))/1*(parseInt(e(118))/2)+parseInt(e(117))/3+parseInt(e(123))/4*(parseInt(e(121))/5)+parseInt(e(124))/6*(parseInt(e(116))/7)+parseInt(e(119))/8*(-parseInt(e(127))/9)+parseInt(e(115))/10*(-parseInt(e(126))/11)+-parseInt(e(122))/12*(parseInt(e(120))/13))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ni)})(),(window.CKEditor5=window.CKEditor5||{}).realTimeCollaboration=__webpack_exports__})();