import{a as Vs,b as Xr}from"https://app.gitbook.com/public/app/chunks/chunk-XIMPIZNW.min.js";import{b as jr,c as Bt}from"https://app.gitbook.com/public/app/chunks/chunk-CVXS2WWE.min.js";import{a as Yc}from"https://app.gitbook.com/public/app/chunks/chunk-7SYN577H.min.js";import{a as hl}from"https://app.gitbook.com/public/app/chunks/chunk-SPQ53H4M.min.js";import{a as Wn}from"https://app.gitbook.com/public/app/chunks/chunk-Q4FFXFSE.min.js";import{$b as Fc,$c as Kr,Ab as nr,Ad as vl,B as js,Ca as Qs,Cb as Mn,Cd as Fi,D as zs,Db as Vi,Dd as yl,Eb as mc,Fb as yc,Fd as bl,Gb as bc,Gd as Sl,Hd as wl,Ib as Rc,Ic as Xn,Jb as xc,Jc as bt,Ka as ec,Kb as D,Kd as Cl,L as Us,La as tc,Lc as ar,M as En,Ma as Mi,Mc as Kn,Md as Bi,N as In,Nc as rl,Ob as Dc,Oc as nl,Sb as Lc,Sc as ol,T as Gs,Ub as Ac,Ud as Pl,Vb as Mc,Vc as il,Wc as al,Xb as Nc,Xc as sl,Xd as Tl,Y as Lt,Yb as Vc,Yc as qn,Zb as Hc,Zc as Yn,Zd as ih,_c as cl,a as Qe,ac as Bc,ae as Rl,b as Ds,ba as Xs,bb as rc,bc as Gr,bd as St,be as Wi,c as Ge,cb as Ni,cc as Wc,cd as qr,d as et,da as Ks,dc as jc,dd as $n,de as xl,e as _n,ea as At,ec as zc,ed as Jn,ee as Ol,f as Ls,fa as Mt,fc as Uc,fd as ll,fe as kl,gc as Gc,ge as _l,ha as Dn,hb as nc,hc as Xc,he as cr,ib as oc,ic as Kc,jb as ic,je as El,k as As,kc as qc,kd as sr,ke as Il,l as Ms,lc as Bn,ld as ul,le as oe,m as Wr,md as fl,me as Dl,n as Ns,nc as jn,nd as dl,o as Hs,oa as Zs,od as Zn,p as Fs,pd as H,qd as pl,rd as ml,ub as An,uc as zn,vb as sc,vc as Qc,w as Ws,wc as el,xc as Gn,xd as wt,yb as cc,yd as gl,zb as lc,zd as Ft}from"https://app.gitbook.com/public/app/chunks/chunk-I7BL7CQR.min.js";import{b as Bs}from"https://app.gitbook.com/public/app/chunks/chunk-5FPUWM4W.min.js";import"https://app.gitbook.com/public/app/chunks/chunk-QD7B4A3P.min.js";import{E as Js,u as qs,v as Ys,w as $s}from"https://app.gitbook.com/public/app/chunks/chunk-PGGTQEJF.min.js";import"https://app.gitbook.com/public/app/chunks/chunk-XAPKRCRI.min.js";import{a as Fe}from"https://app.gitbook.com/public/app/chunks/chunk-QRSAFTZS.min.js";import{d as ft,e as $c}from"https://app.gitbook.com/public/app/chunks/chunk-HHIPUNX3.min.js";import"https://app.gitbook.com/public/app/chunks/chunk-P6BGULCJ.min.js";import{$ as tl,A as Hn,C as z,D as kc,E as gt,F as vt,G as yt,J as Fn,K as _c,L as Ec,M as oh,R as Ic,S as ir,T as Jc,V as Un,X as Zc,_ as ge,b as ht,g as vc,h as Ht,i as nh,l as Sc,n as or,o as wc,p as te,q as Cc,r as Pc,s as ut,t as Ur,u as Tc,w as Oc}from"https://app.gitbook.com/public/app/chunks/chunk-HXHOWDCG.min.js";import{$ as tt,A as On,Aa as _,B as Ei,Ca as lt,Da as K,Ea as A,G as Ii,H as Es,I as ee,K as Dt,L as Di,O as He,P as Is,Q as Li,S as kn,T as Y,V as ac,W as Ln,_ as zr,ea as ct,fa as O,ga as d,ha as h,ia as uc,ka as fc,na as Nt,oa as dc,p as pe,pa as Hi,s as x,sa as pc,t as _s,u as th,ua as Vt,wa as hc,xa as gc,y as b,ya as Nn,za as Vn}from"https://app.gitbook.com/public/app/chunks/chunk-N737KNFL.min.js";import{a as eh}from"https://app.gitbook.com/public/app/chunks/chunk-ZAHVFBAE.min.js";import{a as rr,b as Ai,c as rh}from"https://app.gitbook.com/public/app/chunks/chunk-KAGA7YND.min.js";import{c as Ve,e as P,f as xn,l as c}from"https://app.gitbook.com/public/app/chunks/chunk-OAKVUAEN.min.js";var fu=Ve(Yi=>{c();Object.defineProperty(Yi,"__esModule",{value:!0});var Lh=Object.assign||function(t){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},Ah="src/index.js",Mh=function(){function t(r,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(r,o.key,o)}}return function(r,e,n){return e&&t(r.prototype,e),n&&t(r,n),r}}(),lu=x(),Nh=Hh(lu),Vh=(Y(),xn(kn));function Hh(t){return t&&t.__esModule?t:{default:t}}function Fh(t,r){var e={};for(var n in t)r.indexOf(n)>=0||!Object.prototype.hasOwnProperty.call(t,n)||(e[n]=t[n]);return e}function Bh(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function cu(t,r){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r&&(typeof r=="object"||typeof r=="function")?r:t}function Wh(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof r);t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(t,r):t.__proto__=r)}var uu=function(t){Wh(r,t);function r(){var e,n,o,i;Bh(this,r);for(var a=arguments.length,s=Array(a),l=0;l<a;l++)s[l]=arguments[l];return i=(n=(o=cu(this,(e=r.__proto__||Object.getPrototypeOf(r)).call.apply(e,[this].concat(s))),o),o.state={width:1,height:1},o.measure=function(u){var f=u.nativeEvent;return o.setState({width:f.layout.width,height:f.layout.height})},o.getAngle=function(){if(o.props.useAngle)return o.props.angle+"deg";var u=Math.atan2(o.state.width*(o.props.end.y-o.props.start.y),o.state.height*(o.props.end.x-o.props.start.x))+Math.PI/2;return u+"rad"},o.getColors=function(){return o.props.colors.map(function(u,f){var p=o.props.locations[f],m="";return p&&(m=" "+p*100+"%"),u+m}).join(",")},n),cu(o,i)}return Mh(r,[{key:"render",value:function(){var n=this.props,o=n.start,i=n.end,a=n.colors,s=n.locations,l=n.useAngle,u=n.angleCenter,f=n.angle,p=n.style,m=n.children,v=Fh(n,["start","end","colors","locations","useAngle","angleCenter","angle","style","children"]);return Nh.default.createElement(Vh.View,Lh({},v,{style:[p,{backgroundImage:"linear-gradient("+this.getAngle()+","+this.getColors()+")"}],onLayout:this.measure,__source:{fileName:Ah,lineNumber:72}}),m)}}]),r}(lu.PureComponent);uu.defaultProps={start:{x:.5,y:0},end:{x:.5,y:1},locations:[],colors:[],useAngle:!1,angle:0};Yi.default=uu});var _u=Ve(Yr=>{"use strict";c();eh();var qh=x(),Ou=60103;Yr.Fragment=60107;typeof Symbol=="function"&&Symbol.for&&(ia=Symbol.for,Ou=ia("react.element"),Yr.Fragment=ia("react.fragment"));var ia,Yh=qh.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,$h=Object.prototype.hasOwnProperty,Jh={key:!0,ref:!0,__self:!0,__source:!0};function ku(t,r,e){var n,o={},i=null,a=null;e!==void 0&&(i=""+e),r.key!==void 0&&(i=""+r.key),r.ref!==void 0&&(a=r.ref);for(n in r)$h.call(r,n)&&!Jh.hasOwnProperty(n)&&(o[n]=r[n]);if(t&&t.defaultProps)for(n in r=t.defaultProps,r)o[n]===void 0&&(o[n]=r[n]);return{$$typeof:Ou,type:t,key:i,ref:a,props:o,_owner:Yh.current}}Yr.jsx=ku;Yr.jsxs=ku});var Iu=Ve((WP,Eu)=>{"use strict";c();Eu.exports=_u()});var Bd=Ve((Gk,Mo)=>{c();var bd,Sd,wd,Cd,Pd,Td,Rd,xd,Od,Lo,Ta,kd,_d,Ed,Tr,Id,Dd,Ld,Ad,Md,Nd,Vd,Hd,Fd,Ao;(function(t){var r=typeof window=="object"?window:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&define.amd?define("tslib",["exports"],function(n){t(e(r,e(n)))}):typeof Mo=="object"&&typeof Mo.exports=="object"?t(e(r,e(Mo.exports))):t(e(r));function e(n,o){return n!==r&&(typeof Object.create=="function"?Object.defineProperty(n,"__esModule",{value:!0}):n.__esModule=!0),function(i,a){return n[i]=o?o(i,a):a}}})(function(t){var r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(n[i]=o[i])};bd=function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");r(n,o);function i(){this.constructor=n}n.prototype=o===null?Object.create(o):(i.prototype=o.prototype,new i)},Sd=Object.assign||function(n){for(var o,i=1,a=arguments.length;i<a;i++){o=arguments[i];for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])}return n},wd=function(n,o){var i={};for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&o.indexOf(a)<0&&(i[a]=n[a]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,a=Object.getOwnPropertySymbols(n);s<a.length;s++)o.indexOf(a[s])<0&&Object.prototype.propertyIsEnumerable.call(n,a[s])&&(i[a[s]]=n[a[s]]);return i},Cd=function(n,o,i,a){var s=arguments.length,l=s<3?o:a===null?a=Object.getOwnPropertyDescriptor(o,i):a,u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(n,o,i,a);else for(var f=n.length-1;f>=0;f--)(u=n[f])&&(l=(s<3?u(l):s>3?u(o,i,l):u(o,i))||l);return s>3&&l&&Object.defineProperty(o,i,l),l},Pd=function(n,o){return function(i,a){o(i,a,n)}},Td=function(n,o){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,o)},Rd=function(n,o,i,a){function s(l){return l instanceof i?l:new i(function(u){u(l)})}return new(i||(i=Promise))(function(l,u){function f(v){try{m(a.next(v))}catch(T){u(T)}}function p(v){try{m(a.throw(v))}catch(T){u(T)}}function m(v){v.done?l(v.value):s(v.value).then(f,p)}m((a=a.apply(n,o||[])).next())})},xd=function(n,o){var i={label:0,sent:function(){if(l[0]&1)throw l[1];return l[1]},trys:[],ops:[]},a,s,l,u;return u={next:f(0),throw:f(1),return:f(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function f(m){return function(v){return p([m,v])}}function p(m){if(a)throw new TypeError("Generator is already executing.");for(;i;)try{if(a=1,s&&(l=m[0]&2?s.return:m[0]?s.throw||((l=s.return)&&l.call(s),0):s.next)&&!(l=l.call(s,m[1])).done)return l;switch(s=0,l&&(m=[m[0]&2,l.value]),m[0]){case 0:case 1:l=m;break;case 4:return i.label++,{value:m[1],done:!1};case 5:i.label++,s=m[1],m=[0];continue;case 7:m=i.ops.pop(),i.trys.pop();continue;default:if(l=i.trys,!(l=l.length>0&&l[l.length-1])&&(m[0]===6||m[0]===2)){i=0;continue}if(m[0]===3&&(!l||m[1]>l[0]&&m[1]<l[3])){i.label=m[1];break}if(m[0]===6&&i.label<l[1]){i.label=l[1],l=m;break}if(l&&i.label<l[2]){i.label=l[2],i.ops.push(m);break}l[2]&&i.ops.pop(),i.trys.pop();continue}m=o.call(n,i)}catch(v){m=[6,v],s=0}finally{a=l=0}if(m[0]&5)throw m[1];return{value:m[0]?m[1]:void 0,done:!0}}},Od=function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&Ao(o,n,i)},Ao=Object.create?function(n,o,i,a){a===void 0&&(a=i);var s=Object.getOwnPropertyDescriptor(o,i);(!s||("get"in s?!o.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(n,a,s)}:function(n,o,i,a){a===void 0&&(a=i),n[a]=o[i]},Lo=function(n){var o=typeof Symbol=="function"&&Symbol.iterator,i=o&&n[o],a=0;if(i)return i.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&a>=n.length&&(n=void 0),{value:n&&n[a++],done:!n}}};throw new TypeError(o?"Object is not iterable.":"Symbol.iterator is not defined.")},Ta=function(n,o){var i=typeof Symbol=="function"&&n[Symbol.iterator];if(!i)return n;var a=i.call(n),s,l=[],u;try{for(;(o===void 0||o-- >0)&&!(s=a.next()).done;)l.push(s.value)}catch(f){u={error:f}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(u)throw u.error}}return l},kd=function(){for(var n=[],o=0;o<arguments.length;o++)n=n.concat(Ta(arguments[o]));return n},_d=function(){for(var n=0,o=0,i=arguments.length;o<i;o++)n+=arguments[o].length;for(var a=Array(n),s=0,o=0;o<i;o++)for(var l=arguments[o],u=0,f=l.length;u<f;u++,s++)a[s]=l[u];return a},Ed=function(n,o,i){if(i||arguments.length===2)for(var a=0,s=o.length,l;a<s;a++)(l||!(a in o))&&(l||(l=Array.prototype.slice.call(o,0,a)),l[a]=o[a]);return n.concat(l||Array.prototype.slice.call(o))},Tr=function(n){return this instanceof Tr?(this.v=n,this):new Tr(n)},Id=function(n,o,i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=i.apply(n,o||[]),s,l=[];return s={},u("next"),u("throw"),u("return"),s[Symbol.asyncIterator]=function(){return this},s;function u(g){a[g]&&(s[g]=function(C){return new Promise(function(y,w){l.push([g,C,y,w])>1||f(g,C)})})}function f(g,C){try{p(a[g](C))}catch(y){T(l[0][3],y)}}function p(g){g.value instanceof Tr?Promise.resolve(g.value.v).then(m,v):T(l[0][2],g)}function m(g){f("next",g)}function v(g){f("throw",g)}function T(g,C){g(C),l.shift(),l.length&&f(l[0][0],l[0][1])}},Dd=function(n){var o,i;return o={},a("next"),a("throw",function(s){throw s}),a("return"),o[Symbol.iterator]=function(){return this},o;function a(s,l){o[s]=n[s]?function(u){return(i=!i)?{value:Tr(n[s](u)),done:s==="return"}:l?l(u):u}:l}},Ld=function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o=n[Symbol.asyncIterator],i;return o?o.call(n):(n=typeof Lo=="function"?Lo(n):n[Symbol.iterator](),i={},a("next"),a("throw"),a("return"),i[Symbol.asyncIterator]=function(){return this},i);function a(l){i[l]=n[l]&&function(u){return new Promise(function(f,p){u=n[l](u),s(f,p,u.done,u.value)})}}function s(l,u,f,p){Promise.resolve(p).then(function(m){l({value:m,done:f})},u)}},Ad=function(n,o){return Object.defineProperty?Object.defineProperty(n,"raw",{value:o}):n.raw=o,n};var e=Object.create?function(n,o){Object.defineProperty(n,"default",{enumerable:!0,value:o})}:function(n,o){n.default=o};Md=function(n){if(n&&n.__esModule)return n;var o={};if(n!=null)for(var i in n)i!=="default"&&Object.prototype.hasOwnProperty.call(n,i)&&Ao(o,n,i);return e(o,n),o},Nd=function(n){return n&&n.__esModule?n:{default:n}},Vd=function(n,o,i,a){if(i==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof o=="function"?n!==o||!a:!o.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?a:i==="a"?a.call(n):a?a.value:o.get(n)},Hd=function(n,o,i,a,s){if(a==="m")throw new TypeError("Private method is not writable");if(a==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof o=="function"?n!==o||!s:!o.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return a==="a"?s.call(n,i):s?s.value=i:o.set(n,i),i},Fd=function(n,o){if(o===null||typeof o!="object"&&typeof o!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof n=="function"?o===n:n.has(o)},t("__extends",bd),t("__assign",Sd),t("__rest",wd),t("__decorate",Cd),t("__param",Pd),t("__metadata",Td),t("__awaiter",Rd),t("__generator",xd),t("__exportStar",Od),t("__createBinding",Ao),t("__values",Lo),t("__read",Ta),t("__spread",kd),t("__spreadArrays",_d),t("__spreadArray",Ed),t("__await",Tr),t("__asyncGenerator",Id),t("__asyncDelegator",Dd),t("__asyncValues",Ld),t("__makeTemplateObject",Ad),t("__importStar",Md),t("__importDefault",Nd),t("__classPrivateFieldGet",Vd),t("__classPrivateFieldSet",Hd),t("__classPrivateFieldIn",Fd)})});var Gp=Ve(ss=>{"use strict";c();Object.defineProperty(ss,"__esModule",{value:!0});var jy={justifyContent:"center",alignItems:"center",overflow:"hidden",backgroundColor:"transparent"};ss.default={container:jy}});var Xp=Ve(ri=>{"use strict";c();Object.defineProperty(ri,"__esModule",{value:!0});();ri.Props=zy;var Uy=function(){function t(){this.centerX=.5,this.centerY=.5}return t}();ri.State=Uy});var qp=Ve(Zt=>{"use strict";c();var Gy=Zt&&Zt.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,e){r.__proto__=e}||function(r,e){for(var n in e)e.hasOwnProperty(n)&&(r[n]=e[n])};return function(r,e){t(r,e);function n(){this.constructor=r}r.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),Xy=Zt&&Zt.__assign||Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++){r=arguments[e];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t};Object.defineProperty(Zt,"__esModule",{value:!0});var ni=x(),fe=(Y(),xn(kn)),Ky=Gp(),Kp=Xp(),qy=function(t){Gy(r,t);function r(){var e=t!==null&&t.apply(this,arguments)||this;return e.state=new Kp.State,e.lastPositionX=null,e.positionX=0,e.animatedPositionX=new fe.Animated.Value(0),e.lastPositionY=null,e.positionY=0,e.animatedPositionY=new fe.Animated.Value(0),e.scale=1,e.animatedScale=new fe.Animated.Value(1),e.zoomLastDistance=null,e.zoomCurrentDistance=0,e.imagePanResponder=null,e.lastTouchStartTime=0,e.horizontalWholeOuterCounter=0,e.swipeDownOffset=0,e.horizontalWholeCounter=0,e.verticalWholeCounter=0,e.centerDiffX=0,e.centerDiffY=0,e.lastClickTime=0,e.isLongPress=!1,e.isHorizontalWrap=!1,e.resetScale=function(){e.positionX=0,e.positionY=0,e.scale=1,e.animatedScale.setValue(1)},e.panResponderReleaseResolve=function(){if(e.props.enableSwipeDown&&e.props.swipeDownThreshold&&e.swipeDownOffset>e.props.swipeDownThreshold){e.props.onSwipeDown&&e.props.onSwipeDown();return}if(e.props.enableCenterFocus&&e.scale<1&&(e.scale=1,fe.Animated.timing(e.animatedScale,{toValue:e.scale,duration:100}).start()),e.props.imageWidth*e.scale<=e.props.cropWidth&&(e.positionX=0,fe.Animated.timing(e.animatedPositionX,{toValue:e.positionX,duration:100}).start()),e.props.imageHeight*e.scale<=e.props.cropHeight&&(e.positionY=0,fe.Animated.timing(e.animatedPositionY,{toValue:e.positionY,duration:100}).start()),e.props.imageHeight*e.scale>e.props.cropHeight){var n=(e.props.imageHeight*e.scale-e.props.cropHeight)/2/e.scale;e.positionY<-n?e.positionY=-n:e.positionY>n&&(e.positionY=n),fe.Animated.timing(e.animatedPositionY,{toValue:e.positionY,duration:100}).start()}if(e.props.imageWidth*e.scale>e.props.cropWidth){var o=(e.props.imageWidth*e.scale-e.props.cropWidth)/2/e.scale;e.positionX<-o?e.positionX=-o:e.positionX>o&&(e.positionX=o),fe.Animated.timing(e.animatedPositionX,{toValue:e.positionX,duration:100}).start()}e.props.enableCenterFocus&&e.scale===1&&(e.positionX=0,e.positionY=0,fe.Animated.timing(e.animatedPositionX,{toValue:e.positionX,duration:100}).start(),fe.Animated.timing(e.animatedPositionY,{toValue:e.positionY,duration:100}).start()),e.horizontalWholeOuterCounter=0,e.swipeDownOffset=0,e.imageDidMove("onPanResponderRelease")},e}return r.prototype.componentWillMount=function(){var e=this;this.imagePanResponder=fe.PanResponder.create({onStartShouldSetPanResponder:function(){return!0},onPanResponderTerminationRequest:function(){return!1},},onPanResponderTerminate:function(){}})},r.prototype.componentDidMount=function(){this.props.centerOn&&this.centerOn(this.props.centerOn)},r.prototype.componentWillReceiveProps=function(e){(e.centerOn&&!this.props.centerOn||e.centerOn&&this.props.centerOn&&this.didCenterOnChange(this.props.centerOn,e.centerOn))&&this.centerOn(e.centerOn)},r.prototype.imageDidMove=function(e){this.props.onMove&&this.props.onMove({type:e,positionX:this.positionX,positionY:this.positionY,scale:this.scale,zoomCurrentDistance:this.zoomCurrentDistance})},r.prototype.didCenterOnChange=function(e,n){return e.x!==n.x||e.y!==n.y||e.scale!==n.scale},r.prototype.centerOn=function(e){var n=this;this.positionX=e.x,this.positionY=e.y,this.scale=e.scale;var o=e.duration||300;fe.Animated.parallel([fe.Animated.timing(this.animatedScale,{toValue:this.scale,duration:o}),fe.Animated.timing(this.animatedPositionX,{toValue:this.positionX,duration:o}),fe.Animated.timing(this.animatedPositionY,{toValue:this.positionY,duration:o})]).start(function(){n.imageDidMove("centerOn")})},r.prototype.handleLayout=function(e){this.props.layoutChange&&this.props.layoutChange(e)},r.prototype.reset=function(){this.scale=1,this.animatedScale.setValue(this.scale),this.positionX=0,this.animatedPositionX.setValue(this.positionX),this.positionY=0,this.animatedPositionY.setValue(this.positionY)},r.prototype.render=function(){var e={transform:[{scale:this.animatedScale},{translateX:this.animatedPositionX},{translateY:this.animatedPositionY}]},n=fe.StyleSheet.flatten(this.props.style);return ni.createElement(fe.View,{style:Xy({},Ky.default.container,n,{width:this.props.cropWidth,height:this.props.cropHeight}),...this.imagePanResponder.panHandlers},ni.createElement(fe.Animated.View,{style:e,renderToHardwareTextureAndroid:!0},ni.createElement(fe.View,{onLayout:this.handleLayout.bind(this),style:{width:this.props.imageWidth,height:this.props.imageHeight}},this.props.children)))},r.defaultProps=new Kp.Props,r}(ni.Component);Zt.default=qy});var Yp=Ve(cs=>{"use strict";c();Object.defineProperty(cs,"__esModule",{value:!0});var Yy=qp();cs.default=Yy.default});var ls=Ve(oi=>{"use strict";c();Object.defineProperty(oi,"__esModule",{value:!0});oi.default=function(t,r,e){return{modalContainer:{backgroundColor:e,justifyContent:"center",alignItems:"center",overflow:"hidden"},watchOrigin:{position:"absolute",width:t,bottom:20,justifyContent:"center",alignItems:"center"},watchOriginTouchable:{paddingLeft:10,paddingRight:10,paddingTop:5,paddingBottom:5,borderRadius:30,borderColor:"white",borderWidth:.5,backgroundColor:"rgba(0, 0, 0, 0.1)"},watchOriginText:{color:"white",backgroundColor:"transparent"},imageStyle:{},container:{backgroundColor:e},moveBox:{flexDirection:"row",alignItems:"center"},menuContainer:{position:"absolute",width:t,height:r,left:0,bottom:0,zIndex:12},menuShadow:{position:"absolute",width:t,height:r,backgroundColor:"black",left:0,bottom:0,opacity:.2,zIndex:10},menuContent:{position:"absolute",width:t,left:0,bottom:0,zIndex:11},operateContainer:{justifyContent:"center",alignItems:"center",backgroundColor:"white",height:40,borderBottomColor:"#ccc",borderBottomWidth:1},operateText:{color:"#333"},loadingTouchable:{width:t,height:r},loadingContainer:{flex:1,justifyContent:"center",alignItems:"center"},arrowLeftContainer:{position:"absolute",top:0,bottom:0,left:0,justifyContent:"center",zIndex:13},arrowRightContainer:{position:"absolute",top:0,bottom:0,right:0,justifyContent:"center",zIndex:13}}};oi.simpleStyle={count:{position:"absolute",left:0,right:0,top:38,zIndex:13,justifyContent:"center",alignItems:"center",backgroundColor:"transparent"},countText:{color:"white",fontSize:16,backgroundColor:"transparent",textShadowColor:"rgba(0, 0, 0, 0.3)",textShadowOffset:{width:0,height:.5},textShadowRadius:0}}});var ds=Ve(ii=>{"use strict";c();Object.defineProperty(ii,"__esModule",{value:!0});var us=x(),fs=(Y(),xn(kn)),$p=ls(),$y=function(){function t(){this.show=!1,this.imageUrls=[],this.flipThreshold=80,this.maxOverflow=300,this.index=0,this.failImageSource=void 0,this.backgroundColor="black",this.footerContainerStyle={},this.menuContext={saveToLocal:"save to the album",cancel:"cancel"},this.saveToLocalByLongPress=!0,this.enableImageZoom=!0,this.style={},this.enableSwipeDown=!1,this.enablePreload=!1,this.pageAnimateTime=100,this.onLongPress=function(){},this.onClick=function(){},this.onSave=function(){},this.onMove=function(){},this.renderHeader=function(){return null},this.renderFooter=function(){return null},this.renderIndicator=function(r,e){return us.createElement(fs.View,{style:$p.simpleStyle.count},us.createElement(fs.Text,{style:$p.simpleStyle.countText},r+"/"+e))},this.renderImage=function(r){return us.createElement(fs.Image,r)},this.renderArrowLeft=function(){return null},this.renderArrowRight=function(){return null},this.onShowModal=function(){},this.onCancel=function(){},this.onSwipeDown=function(){},this.loadingRender=function(){return null},this.onSaveToCamera=function(){},this.onChange=function(){}}return t}();ii.Props=$y;var Jy=function(){function t(){this.show=!1,this.currentShowIndex=0,this.prevIndexProp=0,this.imageLoaded=!1,this.imageSizes=[],this.isShowMenu=!1}return t}();ii.State=Jy});var Qp=Ve(pt=>{"use strict";c();var Zy=pt&&pt.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,e){r.__proto__=e}||function(r,e){for(var n in e)e.hasOwnProperty(n)&&(r[n]=e[n])};return function(r,e){t(r,e);function n(){this.constructor=r}r.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),Qt=pt&&pt.__assign||Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++){r=arguments[e];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},Qy=pt&&pt.__rest||function(t,r){var e={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&r.indexOf(n)<0&&(e[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(t);o<n.length;o++)r.indexOf(n[o])<0&&(e[n[o]]=t[n[o]]);return e};Object.defineProperty(pt,"__esModule",{value:!0});var Q=x(),F=(Y(),xn(kn)),Jp=Yp(),Zp=ls(),ps=ds(),eb=function(t){Zy(r,t);function r(){var e=t!==null&&t.apply(this,arguments)||this;return e.state=new ps.State,e.fadeAnim=new F.Animated.Value(0),e.standardPositionX=0,e.positionXNumber=0,e.positionX=new F.Animated.Value(0),e.width=0,e.height=0,e.styles=Zp.default(0,0,"transparent"),e.hasLayout=!1,e.loadedIndex=new Map,e.handleLongPressWithIndex=new Map,e.imageRefs=[],e.resetImageByIndex=function(n){e.imageRefs[n]&&e.imageRefs[n].reset()},e.preloadImage=function(n){n<e.state.imageSizes.length&&e.loadImage(n+1)},e.handleHorizontalOuterRangeOffset=function(n){n===void 0&&(n=0),e.positionXNumber=e.standardPositionX+n,e.positionX.setValue(e.positionXNumber);var o=F.I18nManager.isRTL?-n:n;o<0?(e.state.currentShowIndex||0<e.props.imageUrls.length-1)&&e.loadImage((e.state.currentShowIndex||0)+1):o>0&&(e.state.currentShowIndex||0>0)&&e.loadImage((e.state.currentShowIndex||0)-1)},e.handleResponderRelease=function(n){n===void 0&&(n=0);var o=F.I18nManager.isRTL?-n:n,i=F.I18nManager.isRTL?e.positionXNumber-e.standardPositionX<-(e.props.flipThreshold||0):e.positionXNumber-e.standardPositionX>(e.props.flipThreshold||0),a=F.I18nManager.isRTL?e.positionXNumber-e.standardPositionX>(e.props.flipThreshold||0):e.positionXNumber-e.standardPositionX<-(e.props.flipThreshold||0);if(o>.7){e.goBack.call(e),(e.state.currentShowIndex||0>0)&&e.loadImage((e.state.currentShowIndex||0)-1);return}else if(o<-.7){e.goNext.call(e),(e.state.currentShowIndex||0<e.props.imageUrls.length-1)&&e.loadImage((e.state.currentShowIndex||0)+1);return}if(i)e.goBack.call(e);else if(a){e.goNext.call(e);return}else{e.resetPosition.call(e);return}},e.goBack=function(){if(e.state.currentShowIndex===0){e.resetPosition.call(e);return}e.positionXNumber=F.I18nManager.isRTL?e.standardPositionX-e.width:e.standardPositionX+e.width,e.standardPositionX=e.positionXNumber,F.Animated.timing(e.positionX,{toValue:e.positionXNumber,duration:e.props.pageAnimateTime}).start();var n=(e.state.currentShowIndex||0)-1;e.setState({currentShowIndex:n},function(){e.props.onChange&&e.props.onChange(e.state.currentShowIndex)})},e.goNext=function(){if(e.state.currentShowIndex===e.props.imageUrls.length-1){e.resetPosition.call(e);return}e.positionXNumber=F.I18nManager.isRTL?e.standardPositionX+e.width:e.standardPositionX-e.width,e.standardPositionX=e.positionXNumber,F.Animated.timing(e.positionX,{toValue:e.positionXNumber,duration:e.props.pageAnimateTime}).start();var n=(e.state.currentShowIndex||0)+1;e.setState({currentShowIndex:n},function(){e.props.onChange&&e.props.onChange(e.state.currentShowIndex)})},e.handleLongPress=function(n){e.props.saveToLocalByLongPress&&e.setState({isShowMenu:!0}),e.props.onLongPress&&e.props.onLongPress(n)},e.handleClick=function(){e.props.onClick&&e.props.onClick(e.handleCancel,e.state.currentShowIndex)},e.handleCancel=function(){e.hasLayout=!1,e.props.onCancel&&e.props.onCancel()},e.handleLayout=function(n){n.nativeEvent.layout.width!==e.width&&(e.hasLayout=!0,e.width=n.nativeEvent.layout.width,e.height=n.nativeEvent.layout.height,e.styles=Zp.default(e.width,e.height,e.props.backgroundColor||"transparent"),e.forceUpdate(),e.jumpToCurrentImage())},e.saveToLocal=function(){e.props.onSave?e.props.onSave(e.props.imageUrls[e.state.currentShowIndex||0].url):(F.CameraRoll.saveToCameraRoll(e.props.imageUrls[e.state.currentShowIndex||0].url),e.props.onSaveToCamera(e.state.currentShowIndex)),e.setState({isShowMenu:!1})},e.handleLeaveMenu=function(){e.setState({isShowMenu:!1})},e.handleSwipeDown=function(){e.props.onSwipeDown&&e.props.onSwipeDown(),e.handleCancel()},e}return r.prototype.componentDidMount=function(){this.init(this.props)},r.getDerivedStateFromProps=function(e,n){return e.index!==n.prevIndexProp?{currentShowIndex:e.index,prevIndexProp:e.index}:null},r.prototype.componentDidUpdate=function(e,n){e.index!==this.props.index&&(this.loadImage(this.props.index||0),this.jumpToCurrentImage(),F.Animated.timing(this.fadeAnim,{toValue:1,duration:200}).start())},r.prototype.init=function(e){var n=this;if(e.imageUrls.length===0)return this.fadeAnim.setValue(0),this.setState(new ps.State);var o=[];e.imageUrls.forEach(function(i){o.push({width:i.width||0,height:i.height||0,status:"loading"})}),this.setState({currentShowIndex:e.index,prevIndexProp:e.index||0,imageSizes:o},function(){n.loadImage(e.index||0),n.jumpToCurrentImage(),F.Animated.timing(n.fadeAnim,{toValue:1,duration:200}).start()})},r.prototype.jumpToCurrentImage=function(){this.positionXNumber=this.width*(this.state.currentShowIndex||0)*(F.I18nManager.isRTL?1:-1),this.standardPositionX=this.positionXNumber,this.positionX.setValue(this.positionXNumber)},r.prototype.loadImage=function(e){var n=this;if(!!this.state.imageSizes[e]&&!this.loadedIndex.has(e)){this.loadedIndex.set(e,!0);var o=this.props.imageUrls[e],i=Qt({},this.state.imageSizes[e]),a=function(){if(!(n.state.imageSizes[e]&&n.state.imageSizes[e].status!=="loading")){var u=n.state.imageSizes.slice();u[e]=i,n.setState({imageSizes:u})}};if(this.state.imageSizes[e].status!=="success"){if(this.state.imageSizes[e].width>0&&this.state.imageSizes[e].height>0){i.status="success",a();return}var s=!1,l=!1;if((!o.url||o.url.startsWith("file:"))&&(l=!0),o.width&&o.height){this.props.enablePreload&&l===!1&&F.Image.prefetch(o.url),i.width=o.width,i.height=o.height,i.status="success",a();return}F.Image.getSize(o.url,function(u,f){i.width=u,i.height=f,i.status="success",a()},function(){try{var u=F.Image.resolveAssetSource(o.props.source);i.width=u.width,i.height=u.height,i.status="success",a()}catch(f){i.status="fail",a()}})}}},r.prototype.resetPosition=function(){this.positionXNumber=this.standardPositionX,F.Animated.timing(this.positionX,{toValue:this.standardPositionX,duration:150}).start()},r.prototype.getContent=function(){var e=this,n=this.width,o=this.height,i=this.props.imageUrls.map(function(a,s){if((e.state.currentShowIndex||0)>s+1||(e.state.currentShowIndex||0)<s-1)return Q.createElement(F.View,{key:s,style:{width:n,height:o}});e.handleLongPressWithIndex.has(s)||e.handleLongPressWithIndex.set(s,e.handleLongPress.bind(e,a));var l=e.state.imageSizes[s]&&e.state.imageSizes[s].width,u=e.state.imageSizes[s]&&e.state.imageSizes[s].height,f=e.state.imageSizes[s];if(!f||!f.status)return Q.createElement(F.View,{key:s,style:{width:n,height:o}});if(l>n){var p=n/l;l*=p,u*=p}if(u>o){var m=o/u;l*=m,u*=m}var ;switch(f.status){case"loading":return Q.createElement(v,{key:s,style:Qt({},e.styles.modalContainer,e.styles.loadingContainer),imageWidth:n,imageHeight:o},Q.createElement(F.View,{style:e.styles.loadingContainer},e.props.loadingRender()));case"success":return a.props||(a.props={}),a.props.style||(a.props.style={}),a.props.style=Qt({},e.styles.imageStyle,a.props.style,{width:l,height:u}),typeof a.props.source=="number"||(a.props.source||(a.props.source={}),a.props.source=Qt({uri:a.url},a.props.source)),e.props.enablePreload&&e.preloadImage(e.state.currentShowIndex||0),Q.createElement(,e.props.renderImage(a.props));case"fail":return Q.createElement(v,{key:s,style:e.styles.modalContainer,imageWidth:e.props.failImageSource?e.props.failImageSource.width:n,imageHeight:e.props.failImageSource?e.props.failImageSource.height:o},e.props.failImageSource&&e.props.renderImage({source:{uri:e.props.failImageSource.url},style:{width:e.props.failImageSource.width,height:e.props.failImageSource.height}}))}});return Q.createElement(F.Animated.View,{style:{zIndex:9}},Q.createElement(F.Animated.View,{style:Qt({},this.styles.container,{opacity:this.fadeAnim})},this.props.renderHeader(this.state.currentShowIndex),Q.createElement(F.View,{style:this.styles.arrowLeftContainer},Q.createElement(F.TouchableWithoutFeedback,{onPress:this.goBack},Q.createElement(F.View,null,this.props.renderArrowLeft()))),Q.createElement(F.View,{style:this.styles.arrowRightContainer},Q.createElement(F.TouchableWithoutFeedback,{onPress:this.goNext},Q.createElement(F.View,null,this.props.renderArrowRight()))),Q.createElement(F.Animated.View,{style:Qt({},this.styles.moveBox,{transform:[{translateX:this.positionX}],width:this.width*this.props.imageUrls.length})},i),this.props.renderIndicator((this.state.currentShowIndex||0)+1,this.props.imageUrls.length),this.props.imageUrls[this.state.currentShowIndex||0]&&this.props.imageUrls[this.state.currentShowIndex||0].originSizeKb&&this.props.imageUrls[this.state.currentShowIndex||0].originUrl&&Q.createElement(F.View,{style:this.styles.watchOrigin},Q.createElement(F.TouchableOpacity,{style:this.styles.watchOriginTouchable},Q.createElement(F.Text,{style:this.styles.watchOriginText},"\u67E5\u770B\u539F\u56FE(2M)"))),Q.createElement(F.View,{style:[{bottom:0,position:"absolute",zIndex:9},this.props.footerContainerStyle]},this.props.renderFooter(this.state.currentShowIndex||0))))},r.prototype.getMenu=function(){return this.state.isShowMenu?this.props.menus?Q.createElement(F.View,{style:this.styles.menuContainer},this.props.menus({cancel:this.handleLeaveMenu,saveToLocal:this.saveToLocal})):Q.createElement(F.View,{style:this.styles.menuContainer},Q.createElement(F.View,{style:this.styles.menuShadow}),Q.createElement(F.View,{style:this.styles.menuContent},Q.createElement(F.TouchableHighlight,{underlayColor:"#F2F2F2",onPress:this.saveToLocal,style:this.styles.operateContainer},Q.createElement(F.Text,{style:this.styles.operateText},this.props.menuContext.saveToLocal)),Q.createElement(F.TouchableHighlight,{underlayColor:"#F2F2F2",onPress:this.handleLeaveMenu,style:this.styles.operateContainer},Q.createElement(F.Text,{style:this.styles.operateText},this.props.menuContext.cancel)))):null},r.prototype.render=function(){var e=null;return e=Q.createElement(F.View,null,this.getContent(),this.getMenu()),Q.createElement(F.View,{onLayout:this.handleLayout,style:Qt({flex:1,overflow:"hidden"},this.props.style)},e)},r.defaultProps=new ps.Props,r}(Q.Component);pt.default=eb});var tm=Ve(vn=>{"use strict";c();Object.defineProperty(vn,"__esModule",{value:!0});var em=Qp();vn.ImageViewer=em.default;var tb=ds();vn.ImageViewerPropsDefine=tb.Props;vn.default=em.default});c();c();(function(){"use strict";var t="ListFormat"in Intl;function r(S,I){if(!(S instanceof I))throw new TypeError("Cannot call a class as a function")}function e(S,I){for(var R=0;R<I.length;R++){var E=I[R];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(S,E.key,E)}}function n(S,I,R){return I&&e(S.prototype,I),R&&e(S,R),S}var o=["conjunction","disjunction","unit"],i=["long","short","narrow"],a=["lookup","best fit"];function s(S){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?s=function(R){return typeof R}:s=function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R},s(S)}function l(S){return typeof Symbol=="function"&&s(Symbol.iterator)==="symbol"?l=function(R){return s(R)}:l=function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":s(R)},l(S)}function u(S){if(S==null)throw new TypeError("Argument ".concat(S," cannot be converted to an Object"));return typeof S=="boolean"?new Boolean(S):typeof S=="number"?new Number(S):typeof S=="string"?new String(S):l(S)==="symbol"?new Object(S):S}var f;function p(S){f=S}function m(){return f}function v(){if(f==null)throw new ReferenceError("Could not determine locale: No default locale has been configured");return f}var T=new WeakMap,g={relevantExtensionKeys:[],localeData:{},availableLocales:[]};function C(S,I,R){var E=T.get(S);E==null&&(E=Object.create(null),T.set(S,E)),E[I]=R}function y(S,I){var R=T.get(S);if(R==null)throw new ReferenceError("No internal slots has been allocated for the given instance of ListFormat");return R[I]}function w(S,I){var R=T.get(S);return R!=null&&I in R}var k=/-u(?:-[0-9a-z]{2,8})+/gi;function q(S){return S.replace(k,"")}function X(S,I){for(var R=I;;){if(S.includes(R))return R;var E=R.lastIndexOf("-");if(E===-1)return;E>=2&&R.charAt(E-2)==="-"&&(E-=2),R=R.slice(0,E)}}function le(S,I){var R=[],E=!0,G=!1,$=void 0;try{for(var he=I[Symbol.iterator](),re;!(E=(re=he.next()).done);E=!0){var de=re.value,se=q(de),Se=X(S,se);Se!==void 0&&R.push(de)}}catch(De){G=!0,$=De}finally{try{!E&&he.return!=null&&he.return()}finally{if(G)throw $}}return R}function M(S,I){return le(S,I)}function U(S){return typeof S=="string"||l(S)==="symbol"}function ne(S,I){if(l(S)!=="object")throw new TypeError("Given argument ".concat(S," must be of type Object"));if(!U(I))throw new TypeError("Given argument ".concat(I," must be a PropertyKey"));return S[I]}function ye(S){return Boolean(S)}function L(S){return S+""}function j(S,I,R,E,G){var $=ne(S,I);if($!==void 0){if(R!=="boolean"&&R!=="string")throw new TypeError("Expected type ".concat(R," to be 'boolean' or 'string"));if(R==="boolean"&&($=ye($)),R==="string"&&($=L($)),E!==void 0&&!E.includes($))throw new RangeError("Value ".concat($," out of range for options property ").concat(I));return $}else return G}function Ne(S,I,R){var E;return R!==void 0?(R=u(R),E=j(R,"localeMatcher","string",a,"best fit")):E="best fit",E==="best fit"?M(S,I):le(S,I)}function be(S){var I=S.availableLocales,R=S.requestedLocales,E=Object.create(null),G=!0,$=!1,he=void 0;try{for(var re=R[Symbol.iterator](),de;!(G=(de=re.next()).done);G=!0){var se=de.value,Se=q(se),De=X(I,Se);if(De!==void 0){if(E.locale=De,se!==Se){var Ue=se.match(k);E.extension=Ue==null?"":Ue[0]}return E}}}catch(Rn){$=!0,he=Rn}finally{try{!G&&re.return!=null&&re.return()}finally{if($)throw he}}var Ze=v();return E.locale=Ze,E}function $e(S){return be(S)}function wi(S,I,R,E,G){var $=R.localeMatcher,he=$==="lookup"?be({availableLocales:S,requestedLocales:I}):$e({availableLocales:S,requestedLocales:I}),re=he.locale,de=Object.create(null);de.dataLocale=re;var se="-u";if(se.length>2){var Se=String.prototype.indexOf.call(re,"-x-");if(Se===-1)re="".concat(re).concat(se);else{var De=re.slice(0,Se),Ue=re.slice(Se);re="".concat(De).concat(se).concat(Ue)}re=Intl.getCanonicalLocales(re)[0]}return de.locale=re,de}function Ci(S){if(Array.isArray(S)){for(var I=0,R=new Array(S.length);I<S.length;I++)R[I]=S[I];return R}}function Pi(S){if(Symbol.iterator in Object(S)||Object.prototype.toString.call(S)==="[object Arguments]")return Array.from(S)}function Ti(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function Ri(S){return Ci(S)||Pi(S)||Ti()}function Pn(S){if(S===void 0)return[];var I=Ri(S);if(I.some(function(R){return typeof R!="string"}))throw new TypeError("All List items must be strings");return I}function xi(S){return Object.prototype.toString.call(S)==="[object Object]"}function Oi(S){return Array.isArray(S)||xi(S)}function Tn(S,I){for(var R=[],E=String.prototype.indexOf.call(S,"{",0),G=0,$=S.length;S[E]!==void 0;){var he=String.prototype.indexOf.call(S,"}",E);if(he<=E)throw new TypeError("Expected endIndex: ".concat(he," to be greater than beginIndex: ").concat(E));if(E>G){var re=S.slice(G,E);R.push({type:"literal",value:re})}var de=S.slice(E+1,he);if(I[Number(de)]==null)throw new TypeError("Expected placeables to have a part for PropertyKey: ".concat(de));var se=I[Number(de)];if(Oi(se.value)){var Se=!0,De=!1,Ue=void 0;try{for(var Ze=se.value[Symbol.iterator](),Rn;!(Se=(Rn=Ze.next()).done);Se=!0){var Jm=Rn.value;R.push(Jm)}}catch(Qm){De=!0,Ue=Qm}finally{try{!Se&&Ze.return!=null&&Ze.return()}finally{if(De)throw Ue}}}else R.push(se);G=he+1,E=String.prototype.indexOf.call(S,"{",G)}if(G<$){var Zm=S.slice(G,$);R.push({type:"literal",value:Zm})}return R}function Br(S,I){var R,E=I.length;if(E===0)return[];if(E===2){R=y(S,"templatePair");var G={type:"element",value:I[0]},$={type:"element",value:I[1]},he={0:G,1:$};return Tn(R,he)}for(var re={type:"element",value:I[E-1]},de=[re],se=E-2;se>=0;){se===0?R=y(S,"templateStart"):se<E-2?R=y(S,"templateMiddle"):R=y(S,"templateEnd");var Se={type:"element",value:I[se]},De={type:"element",value:de},Ue={0:Se,1:De};de=Tn(R,Ue),se--}return de}function ki(S,I){var R=Br(S,I),E="",G=!0,$=!1,he=void 0;try{for(var re=R[Symbol.iterator](),de;!(G=(de=re.next()).done);G=!0){var se=de.value;E+=se.value}}catch(Se){$=!0,he=Se}finally{try{!G&&re.return!=null&&re.return()}finally{if($)throw he}}return E}function _i(S,I){return Br(S,I)}var Je=function(){function S(){r(this,S);var I=arguments[0],R=arguments[1];if((this instanceof S?this.constructor:void 0)===void 0)throw new TypeError("Constructor Intl.ListFormat requires 'new'");var E=Intl.getCanonicalLocales(I);R=R===void 0?Object.create(null):u(R);var G=Object.create(null),$=j(R,"localeMatcher","string",a,"best fit");G.localeMatcher=$;var he=j(R,"type","string",o,"conjunction");C(this,"type",he);var re=j(R,"style","string",i,"long");C(this,"style",re);var de=g.localeData,se=wi(g.availableLocales,E,G),Se=se.dataLocale,De=de[Se],Ue=De.formats[he],Ze=Ue[re];C(this,"templatePair",Ze.Pair),C(this,"templateStart",Ze.Start),C(this,"templateMiddle",Ze.Middle),C(this,"templateEnd",Ze.End),C(this,"locale",se.locale),C(this,"initializedListFormat",this)}return n(S,[{key:"format",value:function(R){var E=this;if(!(E instanceof Object))throw new TypeError("Method Intl.ListFormat.prototype.format called on incompatible receiver ".concat(this.toString()));if(!w(E,"initializedListFormat"))throw new TypeError("Method Intl.ListFormat.prototype.format called on incompatible receiver ".concat(this.toString()));var G=Pn(R);return ki(E,G)}},{key:"formatToParts",value:function(R){var E=this;if(!(E instanceof Object))throw new TypeError("Method Intl.ListFormat.prototype.formatToParts called on incompatible receiver ".concat(this.toString()));if(!w(E,"initializedListFormat"))throw new TypeError("Method Intl.ListFormat.prototype.formatToParts called on incompatible receiver ".concat(this.toString()));var G=Pn(R);return _i(E,G)}},{key:"resolvedOptions",value:function(){var R=this;if(!(R instanceof Object))throw new TypeError("Method Intl.ListFormat.prototype.resolvedOptions called on incompatible receiver ".concat(this.toString()));if(!w(R,"initializedListFormat"))throw new TypeError("Method Intl.ListFormat.prototype.resolvedOptions called on incompatible receiver ".concat(this.toString()));var E=y(this,"locale"),G=y(this,"type"),$=y(this,"style");return{locale:E,type:G,style:$}}}],[{key:"supportedLocalesOf",value:function(R){var E=arguments[1],G=g.availableLocales,$=Intl.getCanonicalLocales(R);return Ne(G,$,E)}},{key:"__addLocaleData",value:function(R){var E=R.data,G=R.locale,$=m();$==null&&p(G),g.localeData[G]=E,g.availableLocales.includes(G)||g.availableLocales.push(G)}}]),S}();Object.defineProperty(Je.prototype,Symbol.toStringTag,{writable:!1,enumerable:!1,value:"Intl.ListFormat",configurable:!0});function It(){if(typeof Intl>"u")throw new TypeError("Could not define Intl.ListFormat: Expected 'Intl' to exist. Remember to include polyfill for Intl.getCanonicalLocales before applying this polyfill");Intl.ListFormat=Je}t||It()})();c();"__addLocaleData"in Intl.ListFormat&&Intl.ListFormat.__addLocaleData({locale:"en",data:{formats:{conjunction:{long:{Pair:"{0} and {1}",Start:"{0}, {1}",Middle:"{0}, {1}",End:"{0}, and {1}"},short:{Pair:"{0} & {1}",Start:"{0}, {1}",Middle:"{0}, {1}",End:"{0}, & {1}"},narrow:{Pair:"{0}, {1}",Start:"{0}, {1}",Middle:"{0}, {1}",End:"{0}, {1}"}},disjunction:{long:{Pair:"{0} or {1}",Start:"{0}, {1}",Middle:"{0}, {1}",End:"{0}, or {1}"},short:{Pair:"{0} or {1}",Start:"{0}, {1}",Middle:"{0}, {1}",End:"{0}, or {1}"},narrow:{Pair:"{0} or {1}",Start:"{0}, {1}",Middle:"{0}, {1}",End:"{0}, or {1}"}},unit:{long:{Pair:"{0}, {1}",Start:"{0}, {1}",Middle:"{0}, {1}",End:"{0}, {1}"},short:{Pair:"{0}, {1}",Start:"{0}, {1}",Middle:"{0}, {1}",End:"{0}, {1}"},narrow:{Pair:"{0} {1}",Start:"{0} {1}",Middle:"{0} {1}",End:"{0} {1}"}}}}});Y();c();function ah(t){return Fs().collection("spaces").doc(t).collection("redirects")}function Ll(t,r){return ah(t).doc(Bs(r))}c();function Al(t){return!!t.collection&&!!t.inheritCustomization}c();function sh(t){return Dn(t).collection("page-feedbacks")}function Ml(t,r){return sh(t).doc(r)}function ch(t,r){return Ml(t,r).collection("feedbacks")}function ji(t,r,e){return ch(t,r).doc(e)}function Nl(t,r){let e=ji(r.space,r.page,r.visitorId),n=Ml(r.space,r.page);t.set(e,{visitorId:r.visitorId,rating:r.rating,createdAt:Ge.firestore.Timestamp.now(),revision:r.revision,page:r.page}),t.set(n,{[r.rating]:Ge.firestore.FieldValue.increment(1),updatedAt:Ge.firestore.Timestamp.now()},{merge:!0}),r.previousRating&&t.update(n,{[r.previousRating]:Ge.firestore.FieldValue.increment(-1)})}c();c();var lr=P(x()),Qn=P(nh());function Vl(t=2e3){let[r,e]=lr.useState(!1),n=lr.useRef(null);return lr.useEffect(()=>(!r&&typeof window<"u"&&(n.current=setTimeout(()=>(0,Qn.unstable_runWithPriority)(Qn.unstable_IdlePriority,()=>e(!0)),t)),()=>{n.current&&clearTimeout(n.current)}),[]),r}c();var eo=P(x());function Hl(t,r){let[e,n]=eo.useState(t);return eo.useEffect(()=>{let o=typeof r=="number"?r:r[t],i=setTimeout(()=>{n(t)},o);return()=>{clearTimeout(i)}},[t,r]),e}c();var Fl=P(x());function Bl(){let t=Fl.useRef();return or(()=>{t.current=window},[]),t}c();var ur=P(x());function Wl(){let t=ur.useRef(new WeakMap);return ur.useCallback(r=>(t.current.has(r)||t.current.set(r,ur.createRef()),t.current.get(r)),[])}c();var qi=P(x());c();var ce=P(x());Y();c();var Z=P(x());Y();c();var rt=P(x());function lh(t){if(typeof t.key!="string")throw new Error("Need a key getter");return t.key}function zl(t){let{items:r,scrollTo:e,onSelect:n,onOpen:o,onClose:i,getKey:a=lh,active:s=!0,startAtFirst:l}=t,[u,f]=(0,rt.useState)(null),p=xc(),m=(typeof l>"u"?p.current:l)||!1,v=(0,rt.useMemo)(()=>uh(r,u,a,m),[r,u,a,m]),T=vc(v),g=(0,rt.useCallback)(w=>f(a(w)),[f,a]),C=(0,rt.useCallback)(w=>{p.current||g(w)},[g]),y=(0,rt.useCallback)(w=>{if(w>0&&T.current.next){let{next:k}=T.current;g(k),e(k)}else if(w<0&&T.current.prev){let{prev:k}=T.current;g(k),e(k)}},[e,g]);return(0,rt.useEffect)(()=>{if(!s)return;let w=k=>{k.key==="Enter"?(k.preventDefault(),k.stopPropagation(),T.current.current&&n(T.current.current)):k.key==="ArrowRight"&&jl(k,"end")?(k.preventDefault(),k.stopPropagation(),T.current.current?o==null||o(T.current.current):y(1)):k.key==="ArrowLeft"&&i&&jl(k,"start")?(k.preventDefault(),k.stopPropagation(),i()):k.key==="ArrowDown"?(k.preventDefault(),k.stopPropagation(),y(1)):k.key==="ArrowUp"&&(k.preventDefault(),k.stopPropagation(),y(-1))};return document.addEventListener("keydown",w,{capture:!0}),()=>{document.removeEventListener("keydown",w,{capture:!0})}},[y,n,o,i,s]),{cursor:v,setCursor:g,hoverItem:C}}function uh(t,r,e,n){let o=null,i=null,a=null;return t.some(s=>(e(s)===r?a=s:a?a&&!i&&(i=s):o=s,a!=null&&i!=null)),a||(n?(o=null,a=t[0],i=t[1]):(o=null,a=null,i=t[0])),{prev:o,next:i,current:a}}function jl(t,r){let e=t.target;if(!e)return!0;let n=e.selectionStart;if(n==null)return!0;let o=e.selectionEnd;if(n!==o)return!1;if(r==="start")return n===0;let i=e.value.length;return n===i}c();var V=P(x());Y();var Ul="Label",Gl="Label",Xl="Label",Kl="Caption",zi="Caption",ql=zi,Yl=V.forwardRef(function(r,e){let{command:n,query:o,active:i,inline:a,executeCommand:s,onHoverIn:l}=r,[u,f]=_(K),[,p]=_(fh),[m,v]=yc(!1),T=f.text,g=f.textMid,C=f.primary,y=u.colors.background.main;i&&(T=f.textStandout,g=f.textMid,y=u.colors.background.muted);let w=[f.Bold],k=V.useCallback(()=>{let le=s(n);le instanceof Promise&&v(()=>le)},[n,s]),q=V.useCallback(()=>l(n),[n,l]),X=te.useInteractiveState({onHoverIn:q});return V.createElement(ht,{ref:e,component:He,...X.events,onMouseDown:le=>{le.preventDefault()},onPress:k,backgroundColor:y,style:[h.directionRow,h.alignCenter,a||n.size==="small"?d.Padding.smallVertical:d.Padding.mediumVertical,a?d.Padding.mediumHorizontal:d.Padding.largeHorizontal,{height:Ui(n,a)}]},m?V.createElement(b,{style:[d.Padding.mediumRight]},V.createElement(gt,{size:O.ICON_M})):n.icon?V.createElement(b,{style:[d.Padding.mediumRight]},V.createElement(V.Suspense,{fallback:V.createElement(b,{style:{width:O.ICON_M,height:O.ICON_M}})},V.createElement(n.icon,{size:O.ICON_M,style:C}))):null,V.createElement(b,{style:h.flex1},V.createElement(b,{style:h.directionRow},V.createElement(b,{style:h.flex1},n.title?V.createElement(b,null,V.createElement(ee,{style:[a?f[Gl]:f[Ul],T,n.subtitle?f.Bold:f.Medium],numberOfLines:1},V.createElement(Wn,{query:o,text:n.title,highlight:w}))):null,n.subtitle?V.createElement(b,null,V.createElement(ee,{style:[a?f[Kl]:f[Xl],g],numberOfLines:a?1:void 0},V.createElement(Wn,{query:o,text:n.subtitle,highlight:w}))):null),n.label?V.createElement(b,{style:[h.directionRow,h.alignCenter,d.Margin.smallLeft,d.Padding.smallHorizontal,p.commandLabel]},n.label.icon?V.createElement(b,{style:[d.Padding.smallRight]},V.createElement(V.Suspense,{fallback:V.createElement(b,{style:{width:O.ICON_S,height:O.ICON_S}})},V.createElement(n.label.icon,{size:O.ICON_S,style:f.textInsideColor}))):null,V.createElement(b,null,V.createElement(ee,{style:[f.Caption,f.textInsideColor]},n.label.title))):null,a||!n.shortcut?null:V.createElement(b,{style:[h.directionRow,h.alignCenter]},V.createElement(b,{style:[d.Margin.smallLeft,d.Padding.smallHorizontal]},V.createElement(Bn,{shortcut:n.shortcut})))),n.body?V.createElement(b,{style:[p.commandBody,d.Padding.smallLeft,d.Margin.smallTop]},n.body.map((le,M)=>V.createElement(b,{key:M},V.createElement(ee,{style:[a?f[ql]:f[zi],f.textMid],numberOfLines:1},V.createElement(Wn,{query:o,text:le,highlight:w}))))):null),n.descendant?V.createElement(b,{style:[d.Padding.mediumLeft]},V.createElement(z.ChevronRight,{size:O.ICON_S,style:[f.textMuted]})):null,typeof n.selected=="boolean"?V.createElement(b,{style:[d.Padding.mediumLeft]},V.createElement(Ac,{value:n.selected,onValueChange:k,size:a?O.ICON_S:O.ICON_M})):null,typeof n.enabled=="boolean"?V.createElement(b,{style:[d.Padding.mediumLeft]},V.createElement(Lc,{value:n.enabled,onValueChange:k})):null)});function Ui(t,r){let e=0;return e+=2*(r||t.size==="small"?d.small:d.medium),e+=Math.max(t.title&&(r?Nt[Gl]:Nt[Ul]).lineHeight||0,t.icon?O.ICON_M:0,typeof t.selected=="boolean"||typeof t.enabled=="boolean"?r?O.ICON_S:O.ICON_M:0),t.subtitle&&(e+=(r?Nt[Kl]:Nt[Xl]).lineHeight||0),t.body&&(e+=d.small,e+=t.body.length*((r?Nt[ql]:Nt[zi]).lineHeight||0)),e}var fh=A.create({commandLabel:t=>({height:O.BUTTON_S,borderRadius:t.radiuses.large,backgroundColor:t.colors.primary.main,textColor:t.colors.primary.textInside}),commandBody:t=>({borderLeftWidth:1,borderLeftColor:t.colors.border.mid})});function $l(t){var ye;let{computed:{listId:r,items:e,sections:n,areMoreLoading:o},withKeyboardInteractions:i,palette:a,setPalette:s,setTopPalette:l}=t,u=ir(),f=Z.useRef(null),p=Wl(),m=Z.useCallback(async L=>{let j=await Nc(a,L);j?s(j):l(null)},[s,l]),v=Z.useCallback(L=>{s(j=>{if(!j)return null;let Ne=p(L),be=Vc(j,L,Ne);return be||(j.descendant?{...j,descendant:void 0}:j)})},[s,p]),T=Z.useCallback(()=>{s(L=>L!=null&&L.parent?null:L)},[s]),g=Z.useCallback(L=>{let j=-1;return{sectionIndex:n.findIndex(be=>(j=be.data.findIndex($e=>$e.key===L),j>=0)),itemIndex:j,viewPosition:.5}},[n]),C=Z.useCallback(L=>{var j;return(j=f.current)==null?void 0:j.scrollToLocation(g(L.key))},[g]),y=!!a.position,w=zl({active:i,items:e,onSelect:m,onOpen:v,onClose:T,scrollTo:C,startAtFirst:y?void 0:!0}),k=y?n.length>1:!0,q=Z.useCallback(L=>{w.hoverItem(L),a.position&&v(L)},[w.hoverItem,v,!!a.position]),X=Z.useMemo(()=>qc({getItemHeight:({item:L})=>Ui(L,y),getSectionSeparatorHeight:({section:L,leadingItem:j,leadingSection:Ne,trailingItem:be,trailingSection:$e})=>Ne&&!j&&!L.group.title?2*(d.small-1)+1:$e&&!be?y?O.S/4:O.S/2:0,getSectionHeaderHeight:({section:L})=>k&&L.group.title?O.S:0}),[y,k]),le=Z.useMemo(()=>k?({section:L})=>L.group.title?Z.createElement(ph,{group:L.group,inline:y}):null:void 0,[y,k]),M=Z.useCallback(L=>Z.createElement(mh,{...L,inline:y}),[y]),U=Z.useCallback(({item:L})=>{var j;return Z.createElement(Yl,{ref:p(L),active:u==="desktop"&&L.key===((j=w.cursor.current)==null?void 0:j.key),command:L,query:a.query.text,inline:y,executeCommand:m,onHoverIn:q})},[m,p,y,(ye=w.cursor.current)==null?void 0:ye.key,q,u]),ne=o&&y;if(!ne&&e.length===0){let L=a.placeholder||(Gr(a)?null:"No items found");return L?Z.createElement(dh,{placeholder:L,inline:y}):null}return Z.createElement(b,{style:[h.flex1]},Z.createElement(Es,{key:r,ref:f,sections:n,extraData:w.cursor,getItemLayout:X,renderItem:U,SectionSeparatorComponent:M,renderSectionHeader:le,contentContainerStyle:[y?d.Padding.smallVertical:d.Padding.mediumVertical]}),ne?Z.createElement(b,{style:[h.directionRow,h.justifyContentCenter,d.Padding.medium]},Z.createElement(gt,{size:O.ICON_L})):null)}function dh(t){let{placeholder:r,inline:e}=t,[,n]=_(K);return Z.createElement(b,{style:[d.Padding.smallHorizontal,d.Padding.mediumVertical]},Z.createElement(b,{style:[e?d.Padding.mediumHorizontal:d.Padding.largeHorizontal]},Z.createElement(ee,{style:[n.Caption,n.textMuted]},r)))}function ph(t){let{group:r,inline:e}=t,[,n]=_(K);return Z.createElement(b,{style:[hh.paletteGroupHeader,h.directionRow,h.alignCenter,d.Padding.smallHorizontal]},Z.createElement(b,{style:[e?d.Padding.smallHorizontal:d.Padding.largeHorizontal]},Z.createElement(ee,{style:[n.GroupTitle,n.textMuted]},r.title)))}function mh(t){let{leadingSection:r,section:e,leadingItem:n,inline:o,trailingSection:i,trailingItem:a}=t,[,s]=_(gh);return r&&!n&&!e.group.title?Z.createElement(b,{style:s.paletteDividerUntitled}):(i&&!a&&(b,o?s.paletteDividerFooterInline:s.paletteDividerFooter),null)}var hh=pe.create({paletteGroupHeader:{height:O.S}}),gh=A.create({paletteDividerUntitled:(t,r)=>({marginTop:d.small-1,marginBottom:d.small-1,borderTopColor:r.color==="light"?t.colors.border.mid:t.colors.sidebar.itemBorder,borderTopWidth:1}),paletteDividerFooter:{height:O.S/2},paletteDividerFooterInline:{height:O.S/4}});c();var fr=P(x());Y();function Jl(t){let{error:r,inline:e}=t,[,n]=_(K);return fr.createElement(b,{style:[h.directionRow,e?d.Padding.smallVertical:d.Padding.mediumVertical,e?d.Padding.mediumHorizontal:d.Padding.largeHorizontal]},fr.createElement(b,{style:[d.Padding.mediumRight,d.Padding.xsmallTop]},fr.createElement(z.Warning,{size:O.ICON_S,style:n.danger})),fr.createElement(b,{style:h.flex1},fr.createElement(ee,{style:[n.danger,n.Label]},Ms(r))))}c();var ue=P(x());Y();var Zl=ue.forwardRef(function(r,e){let{palette:n,setPalette:o,loading:i,withItems:a,placement:s}=r,[,l]=_(yh),[u,f]=_(K),p=Hl(i?"loading":"stale",{loading:400,stale:800}),m=Ht(()=>new Dt.Value(0)).current;ue.useEffect(()=>{let y=Dt.timing(m,{useNativeDriver:!0,toValue:p==="loading"?.7:0,duration:ut.TRANSITION_DURATION_SHORT});return y.start(),()=>{y.stop()}},[m,p]);let[v,T]=bc(n.query.text,[n]),g=y=>{T(y),o(w=>!n||!w?n:Hc({...w,descendant:void 0},y))},C=y=>{y.nativeEvent.key==="Backspace"&&n.query.text.length===0?o(w=>w&&Object.keys(w.query.filters).length>0?Bc(w):w):y.nativeEvent.key==="Escape"&&o(null)};return ue.createElement(b,{style:a&&l.paletteInputWrapperWithBottomBorder},ue.createElement(b,{style:[h.directionRow,h.alignCenter]},n.parent&&(!n.position||s==="right")?ue.createElement(b,{style:[n.position?d.Padding.smallLeft:d.Padding.mediumLeft]},ue.createElement(z.ChevronLeft,{size:n.position?O.ICON_M:O.ICON_L,style:f.textMuted})):null,ue.createElement(b,{style:[h.flex1,h.directionRow,h.alignCenter,l.paletteInput,n.position?d.Margin.small:d.Margin.medium]},n.position?null:ue.createElement(b,{style:[d.Margin.largeLeft]},ue.createElement(z.Search,{size:O.ICON_L,style:f.textMuted})),ue.createElement(b,{style:[h.flex1]},ue.createElement(Is,{ref:e,value:v,placeholder:n.search,placeholderTextColor:u.colors.text.muted,onChangeText:g,onKeyPress:C,style:[n.position?f.Caption:f.Body,f.text,n.position?d.Padding.mediumHorizontal:d.Padding.largeHorizontal,n.position?d.Padding.smallVertical:d.Padding.mediumVertical]})),n.position?null:ue.createElement(Dt.View,{style:[d.Margin.smallHorizontal,d.Margin.largeRight,{opacity:m}]},ue.createElement(gt,{size:O.ICON_M,style:f.textMuted})),ue.createElement(D.View,{mobileStyle:"visible",desktopStyle:"hidden",style:[d.Margin.smallHorizontal]},ue.createElement(ge,{icon:z.X,size:"large",onPress:()=>o(null)}))),n.parent&&n.position&&s==="left"?ue.createElement(b,{style:[d.Padding.smallRight]},ue.createElement(z.ChevronRight,{size:O.ICON_M,style:f.textMuted})):null),ue.createElement(vh,{palette:n,setPalette:o}))});function vh(t){let{palette:r,setPalette:e}=t,n=Object.entries(r.query.filters);if(n.length===0)return null;let o=i=>{e(a=>Fc(a,i))};return ue.createElement(b,{style:[h.directionRow,d.Padding.largeHorizontal,d.Padding.mediumBottom]},n.map(([i,a])=>ue.createElement(Mc,{key:i,kind:"primary",size:"small",onPress:()=>o(i),style:d.Margin.smallRight},`${i}: ${a.text}`)))}var yh=A.create({paletteInputWrapperWithBottomBorder:(t,r)=>({borderBottomColor:r.color==="light"?t.colors.border.mid:t.colors.sidebar.itemBorder,borderBottomWidth:1}),paletteInput:t=>({backgroundColor:t.colors.background.muted,borderRadius:t.radiuses.large})});c();var dr=P(x());function Ql(t){let[r,e]=dr.useState(!1),n=Ht(()=>new WeakMap),o=dr.useRef(null);return dr.useMemo(()=>{let i=[],a=[],s;t.groups.forEach(f=>{let p;try{p=bh(t,f)}catch(m){s=m;return}if(p instanceof Promise){let m=n.current.get(f);m&&i.push(m),a.push(p)}else p&&(n.current.set(f,p),i.push(p))});let l=i.filter(f=>f.data.length>0).sort((f,p)=>f.priority>p.priority?-1:f.priority<p.priority?1:0),u=l.reduce((f,p)=>(f.push(...p.data),f),[]);if(a.length>0){e(!0);let f=o.current=Promise.all(a);f.then(()=>{f===o.current&&(e(!1),o.current=null)}).catch(p=>As(new Error(p)))}return{listId:Date.now(),items:u,sections:l,areMoreLoading:r,error:s}},[t.groups,t.query,r,n])}function bh(t,r){try{if(Object.keys(t.query.filters).length>0&&typeof r.commands!="function")return;let e=typeof r.commands=="function"?r.commands(t):r.commands,n=typeof r.commands!="function"||r.commands.length===0,o=r.priority||5;if(n){let i=Sh(t.query.text,e);o=i.reduce((a,s)=>typeof s.score<"u"?Math.max((1-s.score)*10,a):a,o),e=i.map(a=>a.item)}return{group:r,priority:o,data:e}}catch(e){if(e instanceof Promise)return e;throw e}}function Sh(t,r){return t?new nc(r,{threshold:.3,location:0,distance:100,shouldSort:!0,includeScore:!0,minMatchCharLength:1,isCaseSensitive:!1,keys:["title","keywords"]}).search(t):r.map(n=>({item:n,score:void 0}))}c();var Ki=P(rh()),oo=P(x());var Gi=204,to=246,Xi=384,wh=630,ro=180,no=355;function eu(t,r){var s;let e=oo.useMemo(()=>Ph(t,r),[t.position,!!t.parent,r]),n=oo.useCallback(l=>Ch(l,t.position),[t.position]),[o,i,a]=Jc((s=t.position)==null?void 0:s.anchorRef,n,e);return[o,i,a]}function Ch(t,r){let e,n=(r==null?void 0:r.width)||"medium";switch(n){case"small":e={width:Gi,maxWidth:Gi,minWidth:Gi,minHeight:0,height:ro,maxHeight:no};break;case"medium":e={width:to,maxWidth:to,minWidth:to,minHeight:0,height:ro,maxHeight:no};break;case"large":e={width:Xi,maxWidth:Xi,minWidth:Xi,minHeight:0,height:ro,maxHeight:no};break;case"anchor":let o=Math.max(to,t.width),i=(0,Ki.default)(t.width,o,wh);e={width:(0,Ki.default)(t.width,o,i),maxWidth:i,minWidth:o,minHeight:0,height:ro,maxHeight:no};break;default:rr(n)}return e}function Ph(t,r){var n,o;let e={cover:(n=t.position)==null?void 0:n.cover,spacingWithAnchor:d.small};return t.parent?(e.offset={top:-d.small},e.allowedPlacements=r==="left"?["left","right"]:["right","left"]):((o=t.position)==null?void 0:o.width)==="anchor"&&(e.allowedPlacements=["bottom","top"]),e}var Rh=D.createResponsiveComponent(ht);function tu(t){var l;let{palette:r,setPalette:e}=t,n=ce.useRef(null),[,o]=_(nu),i=()=>e(null),a=Ur(ut.fade),s=Cc("OUTSIDE_CLICK");return Fn({opened:!0,closeOnEsc:!Gr(r),closeOnClick:!1,closeOnOutsideClick:!1,closeOnScroll:!1,onClose:i},n),ce.createElement(yt,{ref:n},ce.createElement(Li,{onPressIn:()=>{s&&i()}},ce.createElement(b,{ref:a,style:[o.paletteBackdrop,((l=r.position)==null?void 0:l.anchorRef)&&o.paletteBackdropInline]},ce.createElement(ru,{...t,setTopPalette:e}))))}function ru(t){let{palette:r,setPalette:e,setTopPalette:n,paletteVariant:o,parentPlacement:i}=t,[a,s]=eu(r,i),l=Ur(r.position?ut.slideToL[s]:ut.pop);return ce.createElement(ce.Fragment,null,ce.createElement(lt,{theme:o},ce.createElement(xh,{ref:l,...t,setTopPalette:n,positionStyle:a,placement:s})),r.descendant?ce.createElement(ru,{palette:r.descendant,setTopPalette:n,setPalette:u=>{e(f=>{if(!f)return null;let p=typeof u=="function"?u(f.descendant||null):u;return{...f,descendant:p||void 0}})},paletteVariant:o,parentPlacement:s}):null)}var xh=ce.forwardRef(function(r,e){let{palette:n,setPalette:o,setTopPalette:i,positionStyle:a,placement:s}=r,l=ce.useRef(null),[u,f]=_(nu),p=Ql(n),m=!n.descendant;if(ce.useEffect(()=>{if(n.descendant)return;let v=l.current;v&&(document.activeElement===v||(v.select(),v.focus()))},[n]),!m&&!n.position){let v=Wc(n),T=-(v.length*10),g=-2*T;return ce.createElement(b,{style:[f.palette,f.paletteDesktop,f.paletteDesktopPlaceholder,v.length?{position:"absolute",top:T,height:g,opacity:Math.pow(.6,v.length),transform:[{scale:Math.pow(.95,v.length)}]}:null]})}return ce.createElement(Li,{onPress:v=>v.preventDefault()},ce.createElement(Rh,{ref:e,backgroundColor:u.colors.background.main,style:[f.palette],mobileStyle:f.paletteMobile,desktopStyle:n.position?[f.paletteInline,a]:f.paletteDesktop,onStartShouldSetResponder:()=>!0},Gr(n)?ce.createElement(Zl,{ref:l,palette:n,setPalette:o,loading:p.areMoreLoading,withItems:p.items.length>0,placement:s}):null,p.error?ce.createElement(Jl,{error:p.error,inline:!!n.position}):null,ce.createElement($l,{computed:p,palette:n,withKeyboardInteractions:m,setPalette:o,setTopPalette:i})))}),nu=A.create({paletteBackdrop:t=>({flexDirection:"row",alignItems:"flex-start",justifyContent:"center",position:"fixed",top:0,left:0,right:0,bottom:0,width:"100%",height:"100%",zIndex:100,backgroundColor:t.colors.backdrop.background}),paletteBackdropInline:t=>({backgroundColor:"transparent"}),palette:t=>({borderRadius:t.radiuses.xlarge,borderColor:t.colors.border.main,borderWidth:1,overflow:"hidden",...t.shadows.pop}),paletteDesktop:{marginTop:d.xxlarge,width:640,maxHeight:480},paletteDesktopPlaceholder:t=>({backgroundColor:t.colors.background.main}),paletteMobile:{position:"absolute",marginTop:0,top:d.small,left:d.small,right:d.small,maxHeight:440,width:"auto",maxWidth:"100%",minWidth:"auto"},paletteInline:{position:"absolute"}});function ou(t){let[r,e]=tt(jc);return qi.createElement(Pc,null,r?qi.createElement(tu,{palette:r,setPalette:e,paletteVariant:r.variants||{}}):null)}c();var Wt=P(x());Y();c();var io=P(x());Y();var Oh=D.createResponsiveComponent(He);function iu(t){let[,r]=_(Eh),{close:e}=Gn(),n=ir()==="mobile",o=t.closeable||n,i=()=>{t.onClose&&t.onClose(),e(t.id)},a=Ur({mount:kh,unmount:_h});return io.createElement(b,{ref:a},io.createElement(Oh,{mobileStyle:r.toastMobile,desktopStyle:r.toastDesktop,onPress:()=>{t.onOpen&&t.onOpen(),o&&i()}},io.createElement(tl,{...t,onClose:o?i:void 0,style:r.alert})))}var kh={duration:ut.TRANSITION_DURATION_SHORT,frames:{0:{opacity:0,transform:[{translateY:100}]},1:{opacity:1,transform:[{translateY:0}]}}},_h={duration:ut.TRANSITION_DURATION_SHORT,frames:{0:{opacity:1,transform:[{translateY:0}]},1:{opacity:0,transform:[{translateY:100}]}}},Eh=A.create({toastDesktop:{width:"auto",minWidth:420,maxWidth:720,marginBottom:d.small},toastMobile:{width:"100%",minWidth:0},alert:t=>({...t.shadows.pop,borderColor:t.colors.border.main})});function au(t){let r=zr(el),e=zr(Qc),n=Wt.useRef(null),o=Dh[r];return Wt.createElement(yt,{ref:n},Wt.createElement(D.View,{style:[Ih.toaster],mobileStyle:o.mobile,desktopStyle:o.desktop},Wt.createElement(Tc,null,e.map(i=>Wt.createElement(iu,{...i,key:i.id})))))}var Ih=pe.create({toaster:{position:"fixed",zIndex:200}}),Dh={"bottom-right":pe.create({desktop:{bottom:d.medium,right:d.medium},mobile:{bottom:d.medium,right:d.medium,left:d.medium}}),"bottom-right-with-bar":pe.create({desktop:{bottom:d.xxlarge,right:d.medium},mobile:{bottom:d.xxlarge+d.xlarge+d.medium,right:d.medium,left:d.medium}})};c();var pr=P(x());function su(t){let{children:r}=t;return pr.createElement(hc,null,pr.createElement(Ic,null,pr.createElement(Rc,null,pr.createElement(ou,null),pr.createElement(au,null),r)))}c();var so=P(x());var ao=Fe("auth"),du="gbn-auth-key",$i=Yc(t=>{let{customToken:r,waitUserReady:e=!0}=t;if(typeof window>"u")throw new Error("initializeAuth should not be called during SSR");return!r&&!e?{customToken:r}:new Wr("auth.initialize").wrap(async()=>{let o=localStorage.getItem(du);if(r)try{ao.info("authenticating with custom token before subscribing to auth"),await Ge.auth().signInWithCustomToken(r)}catch(i){ao.critical("Error during auth with custom token",i)}else if(o){ao.info("authenticating with key from gitbook-new");try{await jh(o)}catch(i){ao.error("failed to authenticate with gitbook-new, fallback to normal auth",i)}}return e!==!1&&await new Promise((i,a)=>{let s=Ge.auth().onAuthStateChanged(()=>{s(),i()},a)}),{customToken:r}})});async function jh(t){return new Wr("auth.authenticateWithGitBookNewKey").wrap(async()=>{let{data:e}=await Ge.functions().httpsCallable("users-authWithGitBookNew")({key:t});await Ge.auth().signInWithCustomToken(e.token),localStorage.removeItem(du)})}function Ji(t){return $i.readAsync(t)}function co(t){let{children:r}=t;if(typeof window<"u"){if($i.state==="unstarted")throw new Error("initializeAuth should have been called before useWaitFirebaseAuth");$i.read({})}return so.createElement(so.Fragment,null,r)}c();c();c();function mr(){return mr=Object.assign||function(t){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},mr.apply(this,arguments)}var hr;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(hr||(hr={}));var pu=function(t){return t};var mu="beforeunload";var zh="popstate";function vu(t){t===void 0&&(t={});var r=t,e=r.window,n=e===void 0?document.defaultView:e,o=n.history;function i(){var M=n.location,U=M.pathname,ne=M.search,ye=M.hash,L=o.state||{};return[L.idx,pu({pathname:U,search:ne,hash:ye,state:L.usr||null,key:L.key||"default"})]}var a=null;function s(){if(a)v.call(a),a=null;else{var M=hr.Pop,U=i(),ne=U[0],ye=U[1];if(v.length){if(ne!=null){var L=f-ne;L&&(a={action:M,location:ye,retry:function(){X(L*-1)}},X(L))}}else w(M)}}n.addEventListener(zh,s);var l=hr.Pop,u=i(),f=u[0],p=u[1],m=gu(),v=gu();f==null&&(f=0,o.replaceState(mr({},o.state,{idx:f}),""));function T(M){return typeof M=="string"?M:Zi(M)}function g(M,U){return U===void 0&&(U=null),pu(mr({pathname:p.pathname,hash:"",search:""},typeof M=="string"?Qi(M):M,{state:U,key:Uh()}))}function C(M,U){return[{usr:M.state,key:M.key,idx:U},T(M)]}function y(M,U,ne){return!v.length||(v.call({action:M,location:U,retry:ne}),!1)}function w(M){l=M;var U=i();f=U[0],p=U[1],m.call({action:l,location:p})}function k(M,U){var ne=hr.Push,ye=g(M,U);function L(){k(M,U)}if(y(ne,ye,L)){var j=C(ye,f+1),Ne=j[0],be=j[1];try{o.pushState(Ne,"",be)}catch($e){n.location.assign(be)}w(ne)}}function q(M,U){var ne=hr.Replace,ye=g(M,U);function L(){q(M,U)}if(y(ne,ye,L)){var j=C(ye,f),Ne=j[0],be=j[1];o.replaceState(Ne,"",be),w(ne)}}function X(M){o.go(M)}var le={get action(){return l},get location(){return p},createHref:T,push:k,replace:q,go:X,back:function(){X(-1)},forward:function(){X(1)},listen:function(U){return m.push(U)},block:function(U){var ne=v.push(U);return v.length===1&&n.addEventListener(mu,hu),function(){ne(),v.length||n.removeEventListener(mu,hu)}}};return le}function hu(t){t.preventDefault(),t.returnValue=""}function gu(){var t=[];return{get length(){return t.length},push:function(e){return t.push(e),function(){t=t.filter(function(n){return n!==e})}},call:function(e){t.forEach(function(n){return n&&n(e)})}}}function Uh(){return Math.random().toString(36).substr(2,8)}function Zi(t){var r=t.pathname,e=r===void 0?"/":r,n=t.search,o=n===void 0?"":n,i=t.hash,a=i===void 0?"":i;return o&&o!=="?"&&(e+=o.charAt(0)==="?"?o:"?"+o),a&&a!=="#"&&(e+=a.charAt(0)==="#"?a:"#"+a),e}function Qi(t){var r={};if(t){var e=t.indexOf("#");e>=0&&(r.hash=t.substr(e),t=t.substr(0,e));var n=t.indexOf("?");n>=0&&(r.search=t.substr(n),t=t.substr(0,n)),t&&(r.pathname=t)}return r}var ea=Fe("history");function yu(){let t=vu(),r=[],e=!1,n=()=>{let i=r.shift();return i?(i(),!1):!0},o=i=>{e?r.push(i):i()};return{get location(){return t.location},listen:i=>t.listen(a=>{i({location:a.location,action:a.action})}),push:i=>{let{state:a,...s}=i;o(()=>{ea.info("push",s,a),t.push(s,a)})},replace:i=>{let{state:a,...s}=i;o(()=>{ea.info("replace",s,a),t.replace(s,a)})},go:i=>{o(()=>{ea.info("go",i),t.go(i)})},transaction:i=>{if(e)i();else{let a=t.listen(()=>{n()&&a()});e=!0,i(),e=!1,n()&&a()}}}}c();function Su(t){let{basename:r="",location:e="/",context:n}=t,o=(a,s)=>{n.action=s,n.location=Gh(r,bu(a)),n.url=Zi(n.location)};return{staticContext:n,location:Xh(r,bu(Qi(e))),push:a=>{o(a,"PUSH")},replace:a=>{o(a,"REPLACE")},go:()=>{},listen:()=>()=>{},transaction:a=>{a()}}}function wu(t){return t.charAt(0)==="/"?t:`/${t}`}function Gh(t,r){return t?{...r,pathname:wu(t)+r.pathname}:r}function Xh(t,r){if(!t||!r.pathname)return r;let e=wu(t);return r.pathname.indexOf(e)!==0?r:{...r,pathname:r.pathname.substr(e.length)}}function bu(t){let r={hash:"",search:"",pathname:"",...t,key:"",state:void 0};return r.search&&r.search.charAt(0)!=="?"&&(r.search=`?${r.search}`),r.hash&&r.hash.charAt(0)!=="#"&&(r.hash=`#${r.hash}`),r}c();var jt=P(x()),Cu=P(oh());function ta(t){let{history:r,children:e}=t,n=jt.useMemo(()=>r||yu(),[r]),o=jt.useMemo(()=>({getCurrentValue:()=>n.location,subscribe:a=>n.listen(a)}),[n]),i=(0,Cu.useSubscription)(o);return jt.createElement(il.Provider,{value:n},jt.createElement(al.Provider,{value:i},e))}function Pu(t){let{children:r,...e}=t,n=Su(e);return jt.createElement(ta,{history:n},r)}c();Y();function ra(t){let{accessibilityLabel:r="",src:e,bestHeight:n,maxWidth:o,style:i}=t;return _s("img",{src:e,alt:r,style:[{maxHeight:n,maxWidth:o,width:"auto",height:"auto"},i]})}c();var lo=P(x());c();var Mf=P(Iu()),So=P(x());c();var Le;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})(Le||(Le={}));c();c();c();c();c();c();var gr="dnd-core/INIT_COORDS",Ct="dnd-core/BEGIN_DRAG",vr="dnd-core/PUBLISH_DRAG_SOURCE",Pt="dnd-core/HOVER",Tt="dnd-core/DROP",Rt="dnd-core/END_DRAG";function aa(t,r){return{type:gr,payload:{sourceClientOffset:r||null,clientOffset:t||null}}}c();function uo(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?uo=function(e){return typeof e}:uo=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},uo(t)}function Du(t,r,e){return r.split(".").reduce(function(n,o){return n&&n[o]?n[o]:e||null},t)}function Lu(t,r){return t.filter(function(e){return e!==r})}function fo(t){return uo(t)==="object"}function Au(t,r){var e=new Map,n=function(a){e.set(a,e.has(a)?e.get(a)+1:1)};t.forEach(n),r.forEach(n);var o=[];return e.forEach(function(i,a){i===1&&o.push(a)}),o}function Mu(t,r){return t.filter(function(e){return r.indexOf(e)>-1})}var Zh={type:gr,payload:{clientOffset:null,sourceClientOffset:null}};function Nu(t){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{publishSource:!0},o=n.publishSource,i=o===void 0?!0:o,a=n.clientOffset,s=n.getSourceClientOffset,l=t.getMonitor(),u=t.getRegistry();t.dispatch(aa(a)),Qh(e,l,u);var f=rg(e,l);if(f===null){t.dispatch(Zh);return}var p=null;if(a){if(!s)throw new Error("getSourceClientOffset must be defined");eg(s),p=s(f)}t.dispatch(aa(a,p));var m=u.getSource(f),v=m.beginDrag(l,f);if(v!=null){tg(v),u.pinSource(f);var T=u.getSourceType(f);return{type:Ct,payload:{itemType:T,item:v,sourceId:f,clientOffset:a||null,sourceClientOffset:p||null,isSourcePublic:!!i}}}}}function Qh(t,r,e){H(!r.isDragging(),"Cannot call beginDrag while dragging."),t.forEach(function(n){H(e.getSource(n),"Expected sourceIds to be registered.")})}function eg(t){H(typeof t=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function tg(t){H(fo(t),"Item must be an object.")}function rg(t,r){for(var e=null,n=t.length-1;n>=0;n--)if(r.canDragSource(t[n])){e=t[n];break}return e}c();function Vu(t){return function(){var e=t.getMonitor();if(e.isDragging())return{type:vr}}}c();c();function $r(t,r){return r===null?t===null:Array.isArray(t)?t.some(function(e){return e===r}):t===r}function Hu(t){return function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=n.clientOffset;ng(e);var i=e.slice(0),a=t.getMonitor(),s=t.getRegistry();og(i,a,s);var l=a.getItemType();return ig(i,s,l),ag(i,a,s),{type:Pt,payload:{targetIds:i,clientOffset:o||null}}}}function ng(t){H(Array.isArray(t),"Expected targetIds to be an array.")}function og(t,r,e){H(r.isDragging(),"Cannot call hover while not dragging."),H(!r.didDrop(),"Cannot call hover after drop.");for(var n=0;n<t.length;n++){var o=t[n];H(t.lastIndexOf(o)===n,"Expected targetIds to be unique in the passed array.");var i=e.getTarget(o);H(i,"Expected targetIds to be registered.")}}function ig(t,r,e){for(var n=t.length-1;n>=0;n--){var o=t[n],i=r.getTargetType(o);$r(i,e)||t.splice(n,1)}}function ag(t,r,e){t.forEach(function(n){var o=e.getTarget(n);o.hover(r,n)})}c();function Fu(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),e.push.apply(e,n)}return e}function Bu(t){for(var r=1;r<arguments.length;r++){var e=arguments[r]!=null?arguments[r]:{};r%2?Fu(Object(e),!0).forEach(function(n){sg(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Fu(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})}return t}function sg(t,r,e){return r in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}function Wu(t){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.getMonitor(),o=t.getRegistry();cg(n);var i=fg(n);i.forEach(function(a,s){var l=lg(a,s,o,n),u={type:Tt,payload:{dropResult:Bu(Bu({},e),l)}};t.dispatch(u)})}}function cg(t){H(t.isDragging(),"Cannot call drop while not dragging."),H(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function lg(t,r,e,n){var o=e.getTarget(t),i=o?o.drop(n,t):void 0;return ug(i),typeof i>"u"&&(i=r===0?{}:n.getDropResult()),i}function ug(t){H(typeof t>"u"||fo(t),"Drop result must either be an object or undefined.")}function fg(t){var r=t.getTargetIds().filter(t.canDropOnTarget,t);return r.reverse(),r}c();function ju(t){return function(){var e=t.getMonitor(),n=t.getRegistry();dg(e);var o=e.getSourceId();if(o!=null){var i=n.getSource(o,!0);i.endDrag(e,o),n.unpinSource()}return{type:Rt}}}function dg(t){H(t.isDragging(),"Cannot call endDrag while not dragging.")}function zu(t){return{beginDrag:Nu(t),publishDragSource:Vu(t),hover:Hu(t),drop:Wu(t),endDrag:ju(t)}}function pg(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function Uu(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function mg(t,r,e){return r&&Uu(t.prototype,r),e&&Uu(t,e),t}var Gu=function(){function t(r,e){var n=this;pg(this,t),this.isSetUp=!1,this.handleRefCountChange=function(){var o=n.store.getState().refCount>0;n.backend&&(o&&!n.isSetUp?(n.backend.setup(),n.isSetUp=!0):!o&&n.isSetUp&&(n.backend.teardown(),n.isSetUp=!1))},this.store=r,this.monitor=e,r.subscribe(this.handleRefCountChange)}return mg(t,[{key:"receiveBackend",value:function(e){this.backend=e}},{key:"getMonitor",value:function(){return this.monitor}},{key:"getBackend",value:function(){return this.backend}},{key:"getRegistry",value:function(){return this.monitor.registry}},{key:"getActions",value:function(){var e=this,n=this.store.dispatch;function o(a){return function(){for(var s=arguments.length,l=new Array(s),u=0;u<s;u++)l[u]=arguments[u];var f=a.apply(e,l);typeof f<"u"&&n(f)}}var i=zu(this);return Object.keys(i).reduce(function(a,s){var l=i[s];return a[s]=o(l),a},{})}},{key:"dispatch",value:function(e){this.store.dispatch(e)}}]),t}();c();c();c();function Be(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Xu=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),sa=function(){return Math.random().toString(36).substring(7).split("").join(".")},Ku={INIT:"@@redux/INIT"+sa(),REPLACE:"@@redux/REPLACE"+sa(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+sa()}};function hg(t){if(typeof t!="object"||t===null)return!1;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(t)===r}function ca(t,r,e){var n;if(typeof r=="function"&&typeof e=="function"||typeof e=="function"&&typeof arguments[3]=="function")throw new Error(Be(0));if(typeof r=="function"&&typeof e>"u"&&(e=r,r=void 0),typeof e<"u"){if(typeof e!="function")throw new Error(Be(1));return e(ca)(t,r)}if(typeof t!="function")throw new Error(Be(2));var o=t,i=r,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function f(){if(l)throw new Error(Be(3));return i}function p(g){if(typeof g!="function")throw new Error(Be(4));if(l)throw new Error(Be(5));var C=!0;return u(),s.push(g),function(){if(!!C){if(l)throw new Error(Be(6));C=!1,u();var w=s.indexOf(g);s.splice(w,1),a=null}}}function m(g){if(!hg(g))throw new Error(Be(7));if(typeof g.type>"u")throw new Error(Be(8));if(l)throw new Error(Be(9));try{l=!0,i=o(i,g)}finally{l=!1}for(var C=a=s,y=0;y<C.length;y++){var w=C[y];w()}return g}function v(g){if(typeof g!="function")throw new Error(Be(10));o=g,m({type:Ku.REPLACE})}function T(){var g,C=p;return g={subscribe:function(w){if(typeof w!="object"||w===null)throw new Error(Be(11));function k(){w.next&&w.next(f())}k();var q=C(k);return{unsubscribe:q}}},g[Xu]=function(){return this},g}return m({type:Ku.INIT}),n={dispatch:m,subscribe:p,getState:f,replaceReducer:v},n[Xu]=T,n}c();c();c();var gg=function(r,e){return r===e};function qu(t,r){return!t&&!r?!0:!t||!r?!1:t.x===r.x&&t.y===r.y}function Yu(t,r){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:gg;if(t.length!==r.length)return!1;for(var n=0;n<t.length;++n)if(!e(t[n],r[n]))return!1;return!0}function $u(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),e.push.apply(e,n)}return e}function Ju(t){for(var r=1;r<arguments.length;r++){var e=arguments[r]!=null?arguments[r]:{};r%2?$u(Object(e),!0).forEach(function(n){vg(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):$u(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})}return t}function vg(t,r,e){return r in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}var Zu={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function Qu(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Zu,r=arguments.length>1?arguments[1]:void 0,e=r.payload;switch(r.type){case gr:case Ct:return{initialSourceClientOffset:e.sourceClientOffset,initialClientOffset:e.clientOffset,clientOffset:e.clientOffset};case Pt:return qu(t.clientOffset,e.clientOffset)?t:Ju(Ju({},t),{},{clientOffset:e.clientOffset});case Rt:case Tt:return Zu;default:return t}}c();c();var Jr="dnd-core/ADD_SOURCE",Zr="dnd-core/ADD_TARGET",Qr="dnd-core/REMOVE_SOURCE",zt="dnd-core/REMOVE_TARGET";function ef(t){return{type:Jr,payload:{sourceId:t}}}function tf(t){return{type:Zr,payload:{targetId:t}}}function rf(t){return{type:Qr,payload:{sourceId:t}}}function nf(t){return{type:zt,payload:{targetId:t}}}function of(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),e.push.apply(e,n)}return e}function We(t){for(var r=1;r<arguments.length;r++){var e=arguments[r]!=null?arguments[r]:{};r%2?of(Object(e),!0).forEach(function(n){yg(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):of(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})}return t}function yg(t,r,e){return r in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}var bg={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function af(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:bg,r=arguments.length>1?arguments[1]:void 0,e=r.payload;switch(r.type){case Ct:return We(We({},t),{},{itemType:e.itemType,item:e.item,sourceId:e.sourceId,isSourcePublic:e.isSourcePublic,dropResult:null,didDrop:!1});case vr:return We(We({},t),{},{isSourcePublic:!0});case Pt:return We(We({},t),{},{targetIds:e.targetIds});case zt:return t.targetIds.indexOf(e.targetId)===-1?t:We(We({},t),{},{targetIds:Lu(t.targetIds,e.targetId)});case Tt:return We(We({},t),{},{dropResult:e.dropResult,didDrop:!0,targetIds:[]});case Rt:return We(We({},t),{},{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}c();function sf(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,r=arguments.length>1?arguments[1]:void 0;switch(r.type){case Jr:case Zr:return t+1;case Qr:case zt:return t-1;default:return t}}c();c();var yr=[],po=[];yr.__IS_NONE__=!0;po.__IS_ALL__=!0;function cf(t,r){if(t===yr)return!1;if(t===po||typeof r>"u")return!0;var e=Mu(r,t);return e.length>0}function lf(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:yr,r=arguments.length>1?arguments[1]:void 0;switch(r.type){case Pt:break;case Jr:case Zr:case zt:case Qr:return yr;case Ct:case vr:case Rt:case Tt:default:return po}var e=r.payload,n=e.targetIds,o=n===void 0?[]:n,i=e.prevTargetIds,a=i===void 0?[]:i,s=Au(o,a),l=s.length>0||!Yu(o,a);if(!l)return yr;var u=a[a.length-1],f=o[o.length-1];return u!==f&&(u&&s.push(u),f&&s.push(f)),s}c();function uf(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return t+1}function ff(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),e.push.apply(e,n)}return e}function df(t){for(var r=1;r<arguments.length;r++){var e=arguments[r]!=null?arguments[r]:{};r%2?ff(Object(e),!0).forEach(function(n){Sg(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):ff(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})}return t}function Sg(t,r,e){return r in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}function pf(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:lf(t.dirtyHandlerIds,{type:r.type,payload:df(df({},r.payload),{},{prevTargetIds:Du(t,"dragOperation.targetIds",[])})}),dragOffset:Qu(t.dragOffset,r),refCount:sf(t.refCount,r),dragOperation:af(t.dragOperation,r),stateId:uf(t.stateId)}}c();c();function wg(t,r){return{x:t.x+r.x,y:t.y+r.y}}function mf(t,r){return{x:t.x-r.x,y:t.y-r.y}}function hf(t){var r=t.clientOffset,e=t.initialClientOffset,n=t.initialSourceClientOffset;return!r||!e||!n?null:mf(wg(r,n),e)}function gf(t){var r=t.clientOffset,e=t.initialClientOffset;return!r||!e?null:mf(r,e)}function Cg(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function vf(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Pg(t,r,e){return r&&vf(t.prototype,r),e&&vf(t,e),t}var yf=function(){function t(r,e){Cg(this,t),this.store=r,this.registry=e}return Pg(t,[{key:"subscribeToStateChange",value:function(e){var n=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{handlerIds:void 0},i=o.handlerIds;H(typeof e=="function","listener must be a function."),H(typeof i>"u"||Array.isArray(i),"handlerIds, when specified, must be an array of strings.");var a=this.store.getState().stateId,s=function(){var u=n.store.getState(),f=u.stateId;try{var p=f===a||f===a+1&&!cf(u.dirtyHandlerIds,i);p||e()}finally{a=f}};return this.store.subscribe(s)}},{key:"subscribeToOffsetChange",value:function(e){var n=this;H(typeof e=="function","listener must be a function.");var o=this.store.getState().dragOffset,i=function(){var s=n.store.getState().dragOffset;s!==o&&(o=s,e())};return this.store.subscribe(i)}},{key:"canDragSource",value:function(e){if(!e)return!1;var n=this.registry.getSource(e);return H(n,"Expected to find a valid source. sourceId=".concat(e)),this.isDragging()?!1:n.canDrag(this,e)}},{key:"canDropOnTarget",value:function(e){if(!e)return!1;var n=this.registry.getTarget(e);if(H(n,"Expected to find a valid target. targetId=".concat(e)),!this.isDragging()||this.didDrop())return!1;var o=this.registry.getTargetType(e),i=this.getItemType();return $r(o,i)&&n.canDrop(this,e)}},{key:"isDragging",value:function(){return Boolean(this.getItemType())}},{key:"isDraggingSource",value:function(e){if(!e)return!1;var n=this.registry.getSource(e,!0);if(H(n,"Expected to find a valid source. sourceId=".concat(e)),!this.isDragging()||!this.isSourcePublic())return!1;var o=this.registry.getSourceType(e),i=this.getItemType();return o!==i?!1:n.isDragging(this,e)}},{key:"isOverTarget",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{shallow:!1};if(!e)return!1;var o=n.shallow;if(!this.isDragging())return!1;var i=this.registry.getTargetType(e),a=this.getItemType();if(a&&!$r(i,a))return!1;var s=this.getTargetIds();if(!s.length)return!1;var l=s.indexOf(e);return o?l===s.length-1:l>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}},{key:"getInitialClientOffset",value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return hf(this.store.getState().dragOffset)}},{key:"getDifferenceFromInitialOffset",value:function(){return gf(this.store.getState().dragOffset)}}]),t}();c();c();var Tg=0;function bf(){return Tg++}c();function mo(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?mo=function(e){return typeof e}:mo=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mo(t)}function Sf(t){H(typeof t.canDrag=="function","Expected canDrag to be a function."),H(typeof t.beginDrag=="function","Expected beginDrag to be a function."),H(typeof t.endDrag=="function","Expected endDrag to be a function.")}function wf(t){H(typeof t.canDrop=="function","Expected canDrop to be a function."),H(typeof t.hover=="function","Expected hover to be a function."),H(typeof t.drop=="function","Expected beginDrag to be a function.")}function ho(t,r){if(r&&Array.isArray(t)){t.forEach(function(e){return ho(e,!1)});return}H(typeof t=="string"||mo(t)==="symbol",r?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}c();c();c();function en(t){ot.length||(go(),Tf=!0),ot[ot.length]=t}var ot=[],Tf=!1,go,nt=0,Rg=1024;function Cf(){for(;nt<ot.length;){var t=nt;if(nt=nt+1,ot[t].call(),nt>Rg){for(var r=0,e=ot.length-nt;r<e;r++)ot[r]=ot[r+nt];ot.length-=nt,nt=0}}ot.length=0,nt=0,Tf=!1}var Pf=typeof window<"u"?window:self,Rf=Pf.MutationObserver||Pf.WebKitMutationObserver;typeof Rf=="function"?go=xg(Cf):go=xf(Cf);en.requestFlush=go;function xg(t){var r=1,e=new Rf(t),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){r=-r,n.data=r}}function xf(t){return function(){var e=setTimeout(o,0),n=setInterval(o,50);function o(){clearTimeout(e),clearInterval(n),t()}}}en.makeRequestCallFromTimer=xf;var vo=[],la=[],Og=en.makeRequestCallFromTimer(kg);function kg(){if(la.length)throw la.shift()}function yo(t){var r;vo.length?r=vo.pop():r=new _g,r.task=t,en(r)}var _g=function(){function t(){}return t.prototype.call=function(){try{this.task.call()}catch(r){yo.onerror?yo.onerror(r):(la.push(r),Og())}finally{this.task=null,vo[vo.length]=this}},t}();function Eg(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function Of(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ig(t,r,e){return r&&Of(t.prototype,r),e&&Of(t,e),t}function Dg(t,r){return Ng(t)||Mg(t,r)||Ag(t,r)||Lg()}function Lg(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ag(t,r){if(!!t){if(typeof t=="string")return kf(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);if(e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set")return Array.from(t);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return kf(t,r)}}function kf(t,r){(r==null||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}function Mg(t,r){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(t)))){var e=[],n=!0,o=!1,i=void 0;try{for(var a=t[Symbol.iterator](),s;!(n=(s=a.next()).done)&&(e.push(s.value),!(r&&e.length===r));n=!0);}catch(l){o=!0,i=l}finally{try{!n&&a.return!=null&&a.return()}finally{if(o)throw i}}return e}}function Ng(t){if(Array.isArray(t))return t}function Vg(t){var r=bf().toString();switch(t){case Le.SOURCE:return"S".concat(r);case Le.TARGET:return"T".concat(r);default:throw new Error("Unknown Handler Role: ".concat(t))}}function _f(t){switch(t[0]){case"S":return Le.SOURCE;case"T":return Le.TARGET;default:H(!1,"Cannot parse handler ID: ".concat(t))}}function Ef(t,r){var e=t.entries(),n=!1;do{var o=e.next(),i=o.done,a=Dg(o.value,2),s=a[1];if(s===r)return!0;n=!!i}while(!n);return!1}var If=function(){function t(r){Eg(this,t),this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=r}return Ig(t,[{key:"addSource",value:function(e,n){ho(e),Sf(n);var o=this.addHandler(Le.SOURCE,e,n);return this.store.dispatch(ef(o)),o}},{key:"addTarget",value:function(e,n){ho(e,!0),wf(n);var o=this.addHandler(Le.TARGET,e,n);return this.store.dispatch(tf(o)),o}},{key:"containsHandler",value:function(e){return Ef(this.dragSources,e)||Ef(this.dropTargets,e)}},{key:"getSource",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;H(this.isSourceId(e),"Expected a valid source ID.");var o=n&&e===this.pinnedSourceId,i=o?this.pinnedSource:this.dragSources.get(e);return i}},{key:"getTarget",value:function(e){return H(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}},{key:"getSourceType",value:function(e){return H(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}},{key:"getTargetType",value:function(e){return H(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}},{key:"isSourceId",value:function(e){var n=_f(e);return n===Le.SOURCE}},{key:"isTargetId",value:function(e){var n=_f(e);return n===Le.TARGET}},{key:"removeSource",value:function(e){var n=this;H(this.getSource(e),"Expected an existing source."),this.store.dispatch(rf(e)),yo(function(){n.dragSources.delete(e),n.types.delete(e)})}},{key:"removeTarget",value:function(e){H(this.getTarget(e),"Expected an existing target."),this.store.dispatch(nf(e)),this.dropTargets.delete(e),this.types.delete(e)}},{key:"pinSource",value:function(e){var n=this.getSource(e);H(n,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=n}},{key:"unpinSource",value:function(){H(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}},{key:"addHandler",value:function(e,n,o){var i=Vg(e);return this.types.set(i,n),e===Le.SOURCE?this.dragSources.set(i,o):e===Le.TARGET&&this.dropTargets.set(i,o),i}}]),t}();function Df(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,o=Hg(n),i=new yf(o,new If(o)),a=new Gu(o,i),s=t(a,r,e);return a.receiveBackend(s),a}function Hg(t){var r=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return ca(pf,t&&r&&r({name:"dnd-core",instanceId:"dnd-core"}))}var Fg=["children"];function Bg(t,r){return Ug(t)||zg(t,r)||jg(t,r)||Wg()}function Wg(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jg(t,r){if(!!t){if(typeof t=="string")return Lf(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);if(e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set")return Array.from(t);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return Lf(t,r)}}function Lf(t,r){(r==null||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}function zg(t,r){var e=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(e!=null){var n=[],o=!0,i=!1,a,s;try{for(e=e.call(t);!(o=(a=e.next()).done)&&(n.push(a.value),!(r&&n.length===r));o=!0);}catch(l){i=!0,s=l}finally{try{!o&&e.return!=null&&e.return()}finally{if(i)throw s}}return n}}function Ug(t){if(Array.isArray(t))return t}function Gg(t,r){if(t==null)return{};var e=Xg(t,r),n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++)n=i[o],!(r.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(t,n)||(e[n]=t[n]))}return e}function Xg(t,r){if(t==null)return{};var e={},n=Object.keys(t),o,i;for(i=0;i<n.length;i++)o=n[i],!(r.indexOf(o)>=0)&&(e[o]=t[o]);return e}var Af=0,bo=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__"),Nf=(0,So.memo)(function(r){var e=r.children,n=Gg(r,Fg),o=Kg(n),i=Bg(o,2),a=i[0],s=i[1];return(0,So.useEffect)(function(){if(s){var l=Vf();return++Af,function(){--Af===0&&(l[bo]=null)}}},[]),(0,Mf.jsx)(Zn.Provider,Object.assign({value:a},{children:e}),void 0)});function Kg(t){if("manager"in t){var r={dragDropManager:t.manager};return[r,!1]}var e=qg(t.backend,t.context,t.options,t.debugMode),n=!t.context;return[e,n]}function qg(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Vf(),e=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,o=r;return o[bo]||(o[bo]={dragDropManager:Df(t,r,e,n)}),o[bo]}function Vf(){return window}c();var ua=P(x());function Yg(t,r){return Qg(t)||Zg(t,r)||Jg(t,r)||$g()}function $g(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jg(t,r){if(!!t){if(typeof t=="string")return Hf(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);if(e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set")return Array.from(t);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return Hf(t,r)}}function Hf(t,r){(r==null||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}function Zg(t,r){var e=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(e!=null){var n=[],o=!0,i=!1,a,s;try{for(e=e.call(t);!(o=(a=e.next()).done)&&(n.push(a.value),!(r&&n.length===r));o=!0);}catch(l){i=!0,s=l}finally{try{!o&&e.return!=null&&e.return()}finally{if(i)throw s}}return n}}function Qg(t){if(Array.isArray(t))return t}function Ff(t){var r=pl(),e=r.getMonitor(),n=ml(e,t),o=Yg(n,2),i=o[0],a=o[1];return(0,ua.useEffect)(function(){return e.subscribeToOffsetChange(a)}),(0,ua.useEffect)(function(){return e.subscribeToStateChange(a)}),i}c();var ev=Ln({key:"firestoreReacheable",default:!0,effects:[t=>{typeof window>"u"||fetch("https://firestore.googleapis.com/$discovery/rest").catch(()=>{t.setSelf(!1)})}]});function Bf(){return zr(ev)}c();var Wf=P(x());var tv=Fe("app:events"),rv=t=>(t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent));function nv(){let t=document.cookie?document.cookie.split("; "):[],r={};for(let e=0;e<t.length;e++){let n=t[e].split("="),o=n.slice(1).join("=");try{let i=decodeURIComponent(n[0]);r[i]=rv(o)}catch(i){tv.warning(`Couldn't parse cookie ${t[e]}. Error: `,i)}}return r}function jf(t,r){return Wf.useEffect(()=>{ov(t,r)},[t.key,r]),null}async ();var br=Ln({key:"mobileToCOpenedAtom",default:!1});c();var wo=P(x());function zf(t){var o,i;let r=wo.useContext(St),e=r.preview||r.mode!=="public-content"||!((o=t==null?void 0:t.intercom)!=null&&o.enabled)||(i=t==null?void 0:t.intercom)==null?void 0:i.appID,n=Vl();return ft(a=>{n&&e&&a.writeAsync({type:"script",src:`https://widget.intercom.io/widget/${e}`,onLoad:async()=>{window.Intercom&&window.Intercom("boot",{app_id:e})}})}),wo.useEffect(()=>()=>{!window.Intercom||(window.Intercom("shutdown"),window.Intercom=void 0)},[]),null}c();var pd=P(x());c();c();c();c();c();function iv(t,r){var e;if(typeof Symbol>"u"||t[Symbol.iterator]==null){if(Array.isArray(t)||(e=av(t))||r&&t&&typeof t.length=="number"){e&&(t=e);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(u){throw u},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,a=!1,s;return{s:function(){e=t[Symbol.iterator]()},n:function(){var u=e.next();return i=u.done,u},e:function(u){a=!0,s=u},f:function(){try{!i&&e.return!=null&&e.return()}finally{if(a)throw s}}}}function av(t,r){if(!!t){if(typeof t=="string")return Uf(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);if(e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set")return Array.from(t);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return Uf(t,r)}}function Uf(t,r){(r==null||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}function sv(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function da(t,r,e){return r in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}function Co(t,r){var e=Gf(t,r,"get");return cv(t,e)}function cv(t,r){return r.get?r.get.call(t):r.value}function lv(t,r,e){var n=Gf(t,r,"set");return uv(t,n,e),e}function Gf(t,r,e){if(!r.has(t))throw new TypeError("attempted to "+e+" private field on non-instance");return r.get(t)}function uv(t,r,e){if(r.set)r.set.call(t,e);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=e}}var Sr=new WeakMap,Xf=function t(){var r=this;sv(this,t),Sr.set(this,{writable:!0,value:void 0}),da(this,"register",function(e){Co(r,Sr).push(e)}),da(this,"unregister",function(e){for(var n;(n=Co(r,Sr).indexOf(e))!==-1;)Co(r,Sr).splice(n,1)}),da(this,"backendChanged",function(e){var n=iv(Co(r,Sr)),o;try{for(n.s();!(o=n.n()).done;){var i=o.value;i.backendChanged(e)}}catch(a){n.e(a)}finally{n.f()}}),lv(this,Sr,[])};function fv(t){return hv(t)||mv(t)||pv(t)||dv()}function dv(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pv(t,r){if(!!t){if(typeof t=="string")return ha(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);if(e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set")return Array.from(t);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return ha(t,r)}}function mv(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function hv(t){if(Array.isArray(t))return ha(t)}function ha(t,r){(r==null||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}function gv(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function it(t,r,e){return r in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}function B(t,r){var e=$f(t,r,"get");return vv(t,e)}function vv(t,r){return r.get?r.get.call(t):r.value}function wr(t,r,e){var n=$f(t,r,"set");return yv(t,n,e),e}function $f(t,r,e){if(!r.has(t))throw new TypeError("attempted to "+e+" private field on non-instance");return r.get(t)}function yv(t,r,e){if(r.set)r.set.call(t,e);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=e}}var je=new WeakMap,Po=new WeakMap,ze=new WeakMap,xt=new WeakMap,Ut=new WeakMap,Kf=new WeakMap,qf=new WeakMap,Yf=new WeakMap,pa=new WeakMap,ma=new WeakMap,To=new WeakMap,ga=function t(r,e,n){var o=this;if(gv(this,t),je.set(this,{writable:!0,value:void 0}),Po.set(this,{writable:!0,value:void 0}),ze.set(this,{writable:!0,value:void 0}),xt.set(this,{writable:!0,value:void 0}),Ut.set(this,{writable:!0,value:void 0}),Kf.set(this,{writable:!0,value:function(a,s,l){var u,f;if(!l.backend)throw new Error("You must specify a 'backend' property in your Backend entry: ".concat(JSON.stringify(l)));var p=l.backend(a,s,l.options),m=l.id,v=!l.id&&p&&p.constructor;if(v&&(m=p.constructor.name),m)v&&console.warn(`Deprecation notice: You are using a pipeline which doesn't include backends' 'id'.
        This might be unsupported in the future, please specify 'id' explicitely for every backend.`);else throw new Error("You must specify an 'id' property in your Backend entry: ".concat(JSON.stringify(l),`
        see this guide: https://github.com/louisbrunner/dnd-multi-backend/tree/master/packages/react-dnd-multi-backend#migrating-from-5xx`));if(B(o,ze)[m])throw new Error(`You must specify a unique 'id' property in your Backend entry:
        `.concat(JSON.stringify(l)," (conflicts with: ").concat(JSON.stringify(B(o,ze)[m]),")"));return{id:m,instance:p,preview:(u=l.preview)!==null&&u!==void 0?u:!1,transition:l.transition,skipDispatchOnTransition:(f=l.skipDispatchOnTransition)!==null&&f!==void 0?f:!1}}}),it(this,"setup",function(){if(!(typeof window>"u")){if(t.isSetUp)throw new Error("Cannot have two MultiBackends at the same time.");t.isSetUp=!0,B(o,qf).call(o,window),B(o,ze)[B(o,je)].instance.setup()}}),it(this,"teardown",function(){typeof window>"u"||(t.isSetUp=!1,B(o,Yf).call(o,window),B(o,ze)[B(o,je)].instance.teardown())}),it(this,"connectDragSource",function(i,a,s){return B(o,To).call(o,"connectDragSource",i,a,s)}),it(this,"connectDragPreview",function(i,a,s){return B(o,To).call(o,"connectDragPreview",i,a,s)}),it(this,"connectDropTarget",function(i,a,s){return B(o,To).call(o,"connectDropTarget",i,a,s)}),it(this,"profile",function(){return B(o,ze)[B(o,je)].instance.profile()}),it(this,"previewEnabled",function(){return B(o,ze)[B(o,je)].preview}),it(this,"previewsList",function(){return B(o,Po)}),it(this,"backendsList",function(){return B(o,xt)}),qf.set(this,{writable:!0,value:function(a){B(o,xt).forEach(function(s){s.transition&&a.addEventListener(s.transition.event,B(o,pa))})}}),Yf.set(this,{writable:!0,value:function(a){B(o,xt).forEach(function(s){s.transition&&a.removeEventListener(s.transition.event,B(o,pa))})}}),pa.set(this,{writable:!0,value:function(a){var s=B(o,je);if(B(o,xt).some(function(p){return p.id!==B(o,je)&&p.transition&&p.transition.check(a)?(wr(o,je,p.id),!0):!1}),B(o,je)!==s){var l;B(o,ze)[s].instance.teardown(),Object.keys(B(o,Ut)).forEach(function(p){var m,v=B(o,Ut)[p];v.unsubscribe(),v.unsubscribe=(m=B(o,ma)).call.apply(m,[o,v.func].concat(fv(v.args)))}),B(o,Po).backendChanged(o);var u=B(o,ze)[B(o,je)];if(u.instance.setup(),u.skipDispatchOnTransition)return;var f=null;try{f=a.constructor(a.type,a)}catch(p){f=document.createEvent("Event"),f.initEvent(a.type,a.bubbles,a.cancelable)}(l=a.target)===null||l===void 0||l.dispatchEvent(f)}}}),ma.set(this,{writable:!0,value:function(a,s,l,u){return B(o,ze)[B(o,je)].instance[a](s,l,u)}}),To.set(this,{writable:!0,value:function(a,s,l,u){var f="".concat(a,"_").concat(s),p=B(o,ma).call(o,a,s,l,u);return B(o,Ut)[f]={func:a,args:[s,l,u],unsubscribe:p},function(){B(o,Ut)[f].unsubscribe(),delete B(o,Ut)[f]}}}),!n||!n.backends||n.backends.length<1)throw new Error(`You must specify at least one Backend, if you are coming from 2.x.x (or don't understand this error)
        see this guide: https://github.com/louisbrunner/dnd-multi-backend/tree/master/packages/react-dnd-multi-backend#migrating-from-2xx`);wr(this,Po,new Xf),wr(this,ze,{}),wr(this,xt,[]),n.backends.forEach(function(i){var a=B(o,Kf).call(o,r,e,i);B(o,ze)[a.id]=a,B(o,xt).push(a)}),wr(this,je,B(this,xt)[0].id),wr(this,Ut,{})};it(ga,"isSetUp",!1);var Ro=function(r,e,n){return new ga(r,e,n)};c();var Cr=function(r,e){return{event:r,check:e}};c();var va=Cr("touchstart",function(t){var r=t;return r.touches!==null&&r.touches!==void 0}),bv=Cr("dragstart",function(t){return t.type.indexOf("drag")!==-1||t.type.indexOf("drop")!==-1}),Sv=Cr("mousedown",function(t){return t.type.indexOf("touch")===-1&&t.type.indexOf("mouse")!==-1}),ya=Cr("pointerdown",function(t){var r=t;return r.pointerType=="mouse"});c();var xo=P(x());var Jf=(0,xo.createContext)(null);c();var ko=P(x()),nd=P(th());c();c();var td=P(x());c();var Qf=P(x());c();var ba=function(r,e){return{x:r.x-e.x,y:r.y-e.y}},wv=function(r){var e=r.getInitialClientOffset(),n=r.getInitialSourceClientOffset();return e===null||n===null||e.x===void 0||e.y===void 0?{x:0,y:0}:ba(e,n)},Zf=function(r,e){var n=r.getClientOffset();if(n===null)return null;if(!e.current||!e.current.getBoundingClientRect)return ba(n,wv(r));var o=e.current.getBoundingClientRect(),i={x:o.width/2,y:o.height/2};return ba(n,i)};var Cv=function(r){var e="translate(".concat(r.x,"px, ").concat(r.y,"px)");return{pointerEvents:"none",position:"fixed",top:0,left:0,transform:e,WebkitTransform:e}},Oo=function(){var r=(0,Qf.useRef)(null),e=Ff(function(n){return{currentOffset:Zf(n,r),isDragging:n.isDragging(),itemType:n.getItemType(),item:n.getItem(),monitor:n}});return!e.isDragging||e.currentOffset===null?{display:!1}:{display:!0,itemType:e.itemType,item:e.item,style:Cv(e.currentOffset),monitor:e.monitor,ref:r}};c();var ed=P(x()),tn=(0,ed.createContext)(void 0);function Pv(t,r){if(t==null)return{};var e=Tv(t,r),n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++)n=i[o],!(r.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(t,n)||(e[n]=t[n]))}return e}function Tv(t,r){if(t==null)return{};var e={},n=Object.keys(t),o,i;for(i=0;i<n.length;i++)o=n[i],!(r.indexOf(o)>=0)&&(e[o]=t[o]);return e}var Sa=function(r){var e=Oo();if(!e.display)return null;var n=e.display,o=Pv(e,["display"]),i;return"children"in r&&typeof r.children=="function"?i=r.children(o):"children"in r?i=r.children:i=r.generator(o),td.default.createElement(tn.Provider,{value:o},i)};c();var Pr=P(x());function Rv(t,r){return _v(t)||kv(t,r)||Ov(t,r)||xv()}function xv(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ov(t,r){if(!!t){if(typeof t=="string")return rd(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);if(e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set")return Array.from(t);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return rd(t,r)}}function rd(t,r){(r==null||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}function kv(t,r){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(t)))){var e=[],n=!0,o=!1,i=void 0;try{for(var a=t[Symbol.iterator](),s;!(n=(s=a.next()).done)&&(e.push(s.value),!(r&&e.length===r));n=!0);}catch(l){o=!0,i=l}finally{try{!n&&a.return!=null&&a.return()}finally{if(o)throw i}}return e}}function _v(t){if(Array.isArray(t))return t}var wa=function(){var r=(0,Pr.useState)(!1),e=Rv(r,2),n=e[0],o=e[1],i=(0,Pr.useContext)(Zn);return(0,Pr.useEffect)(function(){var a,s=i==null||(a=i.dragDropManager)===null||a===void 0?void 0:a.getBackend(),l={backendChanged:function(f){o(f.previewEnabled())}};return o(s.previewEnabled()),s.previewsList().register(l),function(){s.previewsList().unregister(l)}},[i,i.dragDropManager]),n};var Ev=function(r){var e=wa(),n=(0,ko.useContext)(Jf);if(!e)return null;var o=ko.default.createElement(Sa,r);return n!==null?(0,nd.createPortal)(o,n):o};Ev.Context=tn;c();c();c();var Iv=P(x());c();c();c();c();c();var dt;(function(t){t.mouse="mouse",t.touch="touch",t.keyboard="keyboard"})(dt||(dt={}));c();var Lv={Left:1,Right:2,Center:4},Av={Left:0,Center:1,Right:2};function _o(t){return t.button===void 0||t.button===Av.Left}function od(t){return t.buttons===void 0||(t.buttons&Lv.Left)===0}function Eo(t){return!!t.targetTouches}c();var Mv=1;function id(t){var r=t.nodeType===Mv?t:t.parentElement;if(!!r){var e=r.getBoundingClientRect(),n=e.top,o=e.left;return{x:o,y:n}}}function Nv(t,r){if(t.targetTouches.length===1)return rn(t.targetTouches[0]);if(r&&t.touches.length===1&&t.touches[0].target===r.target)return rn(t.touches[0])}function rn(t,r){return Eo(t)?Nv(t,r):{x:t.clientX,y:t.clientY}}c();function ad(t,r,e,n){return Math.sqrt(Math.pow(Math.abs(e-t),2)+Math.pow(Math.abs(n-r),2))}function sd(t,r,e,n,o){if(!o)return!1;for(var i=Math.atan2(n-r,e-t)*180/Math.PI+180,a=0;a<o.length;++a)if((o[a].start==null||i>=o[a].start)&&(o[a].end==null||i<=o[a].end))return!0;return!1}c();var Ca=function(){var t=!1;try{addEventListener("test",function(){},Object.defineProperty({},"passive",{get:function(){return t=!0,!0}}))}catch(r){}return t}();c();function Vv(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function cd(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Hv(t,r,e){return r&&cd(t.prototype,r),e&&cd(t,e),t}function ld(t,r,e){return r in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}var ud=function(){function t(r,e){Vv(this,t),ld(this,"args",void 0),ld(this,"context",void 0),this.args=r,this.context=e}return Hv(t,[{key:"delay",get:function(){var e;return(e=this.args.delay)!==null&&e!==void 0?e:0}},{key:"scrollAngleRanges",get:function(){return this.args.scrollAngleRanges}},{key:"getDropTargetElementsAtPoint",get:function(){return this.args.getDropTargetElementsAtPoint}},{key:"ignoreContextMenu",get:function(){var e;return(e=this.args.ignoreContextMenu)!==null&&e!==void 0?e:!1}},{key:"enableHoverOutsideTarget",get:function(){var e;return(e=this.args.enableHoverOutsideTarget)!==null&&e!==void 0?e:!1}},{key:"enableKeyboardEvents",get:function(){var e;return(e=this.args.enableKeyboardEvents)!==null&&e!==void 0?e:!1}},{key:"enableMouseEvents",get:function(){var e;return(e=this.args.enableMouseEvents)!==null&&e!==void 0?e:!1}},{key:"enableTouchEvents",get:function(){var e;return(e=this.args.enableTouchEvents)!==null&&e!==void 0?e:!0}},{key:"touchSlop",get:function(){return this.args.touchSlop||0}},{key:"delayTouchStart",get:function(){var e,n,o,i;return(e=(n=(o=this.args)===null||o===void 0?void 0:o.delayTouchStart)!==null&&n!==void 0?n:(i=this.args)===null||i===void 0?void 0:i.delay)!==null&&e!==void 0?e:0}},{key:"delayMouseStart",get:function(){var e,n,o,i;return(e=(n=(o=this.args)===null||o===void 0?void 0:o.delayMouseStart)!==null&&n!==void 0?n:(i=this.args)===null||i===void 0?void 0:i.delay)!==null&&e!==void 0?e:0}},{key:"window",get:function(){if(this.context&&this.context.window)return this.context.window;if(typeof window<"u")return window}},{key:"document",get:function(){var e;if((e=this.context)!==null&&e!==void 0&&e.document)return this.context.document;if(this.window)return this.window.document}},{key:"rootElement",get:function(){var e;return((e=this.args)===null||e===void 0?void 0:e.rootElement)||this.document}}]),t}();var nn;function Fv(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function fd(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Bv(t,r,e){return r&&fd(t.prototype,r),e&&fd(t,e),t}function J(t,r,e){return r in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}var on=(nn={},J(nn,dt.mouse,{start:"mousedown",move:"mousemove",end:"mouseup",contextmenu:"contextmenu"}),J(nn,dt.touch,{start:"touchstart",move:"touchmove",end:"touchend"}),J(nn,dt.keyboard,{keydown:"keydown"}),nn),Pa=function(){function t(r,e,n){var o=this;Fv(this,t),J(this,"options",void 0),J(this,"actions",void 0),J(this,"monitor",void 0),J(this,"sourceNodes",void 0),J(this,"sourcePreviewNodes",void 0),J(this,"sourcePreviewNodeOptions",void 0),J(this,"targetNodes",void 0),J(this,"_mouseClientOffset",void 0),J(this,"_isScrolling",void 0),J(this,"listenerTypes",void 0),J(this,"moveStartSourceIds",void 0),J(this,"waitingForDelay",void 0),J(this,"timeout",void 0),J(this,"dragOverTargetIds",void 0),J(this,"draggedSourceNode",void 0),J(this,"draggedSourceNodeRemovalObserver",void 0),J(this,"lastTargetTouchFallback",void 0),J(this,"getSourceClientOffset",function(i){var a=o.sourceNodes.get(i);return a&&id(a)}),J(this,"handleTopMoveStartCapture",function(i){!_o(i)||(o.moveStartSourceIds=[])}),J(this,"handleMoveStart",function(i){Array.isArray(o.moveStartSourceIds)&&o.moveStartSourceIds.unshift(i)}),J(this,"handleTopMoveStart",function(i){if(!!_o(i)){var a=rn(i);a&&(Eo(i)&&(o.lastTargetTouchFallback=i.targetTouches[0]),o._mouseClientOffset=a),o.waitingForDelay=!1}}),J(this,"handleTopMoveStartDelay",function(i){if(!!_o(i)){var a=i.type===on.touch.start?o.options.delayTouchStart:o.options.delayMouseStart;o.timeout=setTimeout(o.handleTopMoveStart.bind(o,i),a),o.waitingForDelay=!0}}),J(this,"handleTopMoveCapture",function(){o.dragOverTargetIds=[]}),J(this,"handleMove",function(i,a){o.dragOverTargetIds&&o.dragOverTargetIds.unshift(a)}),J(this,"handleTopMove",function(i){if(o.timeout&&clearTimeout(o.timeout),!(!o.document||o.waitingForDelay)){var a=o.moveStartSourceIds,s=o.dragOverTargetIds,l=o.options.enableHoverOutsideTarget,u=rn(i,o.lastTargetTouchFallback);if(!!u){if(o._isScrolling||!o.monitor.isDragging()&&sd(o._mouseClientOffset.x||0,o._mouseClientOffset.y||0,u.x,u.y,o.options.scrollAngleRanges)){o._isScrolling=!0;return}if(!o.monitor.isDragging()&&o._mouseClientOffset.hasOwnProperty("x")&&a&&ad(o._mouseClientOffset.x||0,o._mouseClientOffset.y||0,u.x,u.y)>(o.options.touchSlop?o.options.touchSlop:0)&&(o.moveStartSourceIds=void 0,o.actions.beginDrag(a,{clientOffset:o._mouseClientOffset,getSourceClientOffset:o.getSourceClientOffset,publishSource:!1})),!!o.monitor.isDragging()){var f=o.sourceNodes.get(o.monitor.getSourceId());o.installSourceNodeRemovalObserver(f),o.actions.publishDragSource(),i.cancelable&&i.preventDefault();var p=(s||[]).map(function(k){return o.targetNodes.get(k)}).filter(function(k){return!!k}),m=o.options.getDropTargetElementsAtPoint?o.options.getDropTargetElementsAtPoint(u.x,u.y,p):o.document.elementsFromPoint(u.x,u.y),v=[];for(var T in m)if(!!m.hasOwnProperty(T)){var g=m[T];for(v.push(g);g;)g=g.parentElement,g&&v.indexOf(g)===-1&&v.push(g)}var C=v.filter(function(k){return p.indexOf(k)>-1}).map(function(k){return o._getDropTargetId(k)}).filter(function(k){return!!k}).filter(function(k,q,X){return X.indexOf(k)===q});if(l)for(var y in o.targetNodes){var w=o.targetNodes.get(y);if(f&&w&&w.contains(f)&&C.indexOf(y)===-1){C.unshift(y);break}}C.reverse(),o.actions.hover(C,{clientOffset:u})}}}}),J(this,"_getDropTargetId",function(i){for(var a=o.targetNodes.keys(),s=a.next();s.done===!1;){var l=s.value;if(i===o.targetNodes.get(l))return l;s=a.next()}}),J(this,"handleTopMoveEndCapture",function(i){if(o._isScrolling=!1,o.lastTargetTouchFallback=void 0,!!od(i)){if(!o.monitor.isDragging()||o.monitor.didDrop()){o.moveStartSourceIds=void 0;return}i.cancelable&&i.preventDefault(),o._mouseClientOffset={},o.uninstallSourceNodeRemovalObserver(),o.actions.drop(),o.actions.endDrag()}}),J(this,"handleCancelOnEscape",function(i){i.key==="Escape"&&o.monitor.isDragging()&&(o._mouseClientOffset={},o.uninstallSourceNodeRemovalObserver(),o.actions.endDrag())}),this.options=new ud(n,e),this.actions=r.getActions(),this.monitor=r.getMonitor(),this.sourceNodes=new Map,this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.targetNodes=new Map,this.listenerTypes=[],this._mouseClientOffset={},this._isScrolling=!1,this.options.enableMouseEvents&&this.listenerTypes.push(dt.mouse),this.options.enableTouchEvents&&this.listenerTypes.push(dt.touch),this.options.enableKeyboardEvents&&this.listenerTypes.push(dt.keyboard)}return Bv(t,[{key:"profile",value:function(){var e;return{sourceNodes:this.sourceNodes.size,sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,targetNodes:this.targetNodes.size,dragOverTargetIds:((e=this.dragOverTargetIds)===null||e===void 0?void 0:e.length)||0}}},{key:"document",get:function(){return this.options.document}},{key:"setup",value:function(){var e=this.options.rootElement;!e||(H(!t.isSetUp,"Cannot have two Touch backends at the same time."),t.isSetUp=!0,this.addEventListener(e,"start",this.getTopMoveStartHandler()),this.addEventListener(e,"start",this.handleTopMoveStartCapture,!0),this.addEventListener(e,"move",this.handleTopMove),this.addEventListener(e,"move",this.handleTopMoveCapture,!0),this.addEventListener(e,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.addEventListener(e,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.addEventListener(e,"keydown",this.handleCancelOnEscape,!0))}},{key:"teardown",value:function(){var e=this.options.rootElement;!e||(t.isSetUp=!1,this._mouseClientOffset={},this.removeEventListener(e,"start",this.handleTopMoveStartCapture,!0),this.removeEventListener(e,"start",this.handleTopMoveStart),this.removeEventListener(e,"move",this.handleTopMoveCapture,!0),this.removeEventListener(e,"move",this.handleTopMove),this.removeEventListener(e,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.removeEventListener(e,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.removeEventListener(e,"keydown",this.handleCancelOnEscape,!0),this.uninstallSourceNodeRemovalObserver())}},{key:"addEventListener",value:function(e,n,o,i){var a=Ca?{capture:i,passive:!1}:i;this.listenerTypes.forEach(function(s){var l=on[s][n];l&&e.addEventListener(l,o,a)})}},{key:"removeEventListener",value:function(e,n,o,i){var a=Ca?{capture:i,passive:!1}:i;this.listenerTypes.forEach(function(s){var l=on[s][n];l&&e.removeEventListener(l,o,a)})}},{key:"connectDragSource",value:function(e,n){var o=this,i=this.handleMoveStart.bind(this,e);return this.sourceNodes.set(e,n),this.addEventListener(n,"start",i),function(){o.sourceNodes.delete(e),o.removeEventListener(n,"start",i)}}},{key:"connectDragPreview",value:function(e,n,o){var i=this;return this.sourcePreviewNodeOptions.set(e,o),this.sourcePreviewNodes.set(e,n),function(){i.sourcePreviewNodes.delete(e),i.sourcePreviewNodeOptions.delete(e)}}},{key:"connectDropTarget",value:function(e,n){var o=this,i=this.options.rootElement;if(!this.document||!i)return function(){};var a=function(l){if(!(!o.document||!i||!o.monitor.isDragging())){var u;switch(l.type){case on.mouse.move:u={x:l.clientX,y:l.clientY};break;case on.touch.move:u={x:l.touches[0].clientX,y:l.touches[0].clientY};break}var f=u!=null?o.document.elementFromPoint(u.x,u.y):void 0,p=f&&n.contains(f);if(f===n||p)return o.handleMove(l,e)}};return this.addEventListener(this.document.body,"move",a),this.targetNodes.set(e,n),function(){o.document&&(o.targetNodes.delete(e),o.removeEventListener(o.document.body,"move",a))}}},{key:"getTopMoveStartHandler",value:function(){return!this.options.delayTouchStart&&!this.options.delayMouseStart?this.handleTopMoveStart:this.handleTopMoveStartDelay}},{key:"installSourceNodeRemovalObserver",value:function(e){var n=this;this.uninstallSourceNodeRemovalObserver(),this.draggedSourceNode=e,this.draggedSourceNodeRemovalObserver=new MutationObserver(function(){e&&!e.parentElement&&(n.resurrectSourceNode(),n.uninstallSourceNodeRemovalObserver())}),!(!e||!e.parentElement)&&this.draggedSourceNodeRemovalObserver.observe(e.parentElement,{childList:!0})}},{key:"resurrectSourceNode",value:function(){this.document&&this.draggedSourceNode&&(this.draggedSourceNode.style.display="none",this.draggedSourceNode.removeAttribute("data-reactid"),this.document.body.appendChild(this.draggedSourceNode))}},{key:"uninstallSourceNodeRemovalObserver",value:function(){this.draggedSourceNodeRemovalObserver&&this.draggedSourceNodeRemovalObserver.disconnect(),this.draggedSourceNodeRemovalObserver=void 0,this.draggedSourceNode=void 0}}]),t}();J(Pa,"isSetUp",void 0);var dd=function(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return new Pa(r,e,n)};function md(t){return pd.createElement(Nf,{backend:Ro,options:Wv},t.children)}var Wv={backends:[{id:"html5",backend:Rl,transition:ya},{id:"touch",backend:dd,options:{enableMouseEvents:!0,delayMouseStart:100,delayTouchStart:250},transition:va}]};c();function hd(t,r,e=void 0){switch(r){case"light":case"dark":return{...t,color:r};case"none":return t;case"bold":return{...t,color:mc(e||ct.PRIMARY)};default:rr(r)}}var Ek={none:A.create({spaceHeader:t=>({borderBottomWidth:1,borderBottomColor:t.colors.border.main,backgroundColor:t.colors.background.main,zIndex:1})}),light:A.create({spaceHeader:t=>({borderBottomWidth:1,borderBottomColor:t.colors.border.main,backgroundColor:t.colors.background.main,zIndex:1,position:"sticky",top:0})}),dark:A.create({spaceHeader:t=>({borderBottomWidth:1,borderBottomColor:t.colors.border.main,backgroundColor:t.colors.background.main,zIndex:1,position:"sticky",top:0})}),bold:A.create({spaceHeader:t=>({borderBottomWidth:1,borderBottomColor:t.colors.primary.main,backgroundColor:t.colors.primary.main,zIndex:1,position:"sticky",top:0})})};c();var Io=P(x());var an=Io.forwardRef(function(r,e){let{contentRef:n,space:o,revision:i,style:a,kind:s="default",...l}=r,u=cr(n,{space:i.space,revision:i.key});return Io.createElement(Xn,{ref:e,url:u.href,onPress:f=>{f.nativeEvent.metaKey||f.nativeEvent.ctrlKey||(f.preventDefault(),u.open())},kind:s,sameWebTab:!1,style:[Hi.Body,Hi.SemiBold,a],numberOfLines:2,ellipsizeMode:"tail",accessibilityLabel:r.title,...l},r.title)});c();var gd=P(x());Y();function vd(t){return gd.createElement(ee,{...t})}c();var Do=P(x());function yd(t){let{children:r,statusCode:e}=t,n=sl();return n.staticContext&&(n.staticContext.statusCode=e),Do.createElement(Do.Fragment,null,r)}c();var Oe=P(x());c();c();c();var Wd=P(Bd(),1),{__extends:Kk,__assign:Gt,__rest:Ra,__decorate:qk,__param:Yk,__metadata:$k,__awaiter:Jk,__generator:Zk,__exportStar:Qk,__createBinding:e_,__values:t_,__read:r_,__spread:n_,__spreadArrays:jd,__spreadArray:o_,__await:i_,__asyncGenerator:a_,__asyncDelegator:s_,__asyncValues:c_,__makeTemplateObject:l_,__importStar:u_,__importDefault:f_,__classPrivateFieldGet:d_,__classPrivateFieldSet:p_,__classPrivateFieldIn:m_}=Wd.default;var gn=P(x());c();var at=P(x());c();var Re=P(x());c();var Xt="right-scroll-bar-position",Kt="width-before-scroll-bar",xa="with-scroll-bars-hidden",Oa="--removed-body-scroll-bar-size";c();c();function zd(t,r){return typeof t=="function"?t(r):t&&(t.current=r),t}c();var Ud=P(x());function Gd(t,r){var e=(0,Ud.useState)(function(){return{value:t,callback:r,facade:{get current(){return e.value},set current(n){var o=e.value;o!==n&&(e.value=n,e.callback(n,o))}}}})[0];return e.callback=r,e.facade}c();function sn(t,r){return Gd(r||null,function(e){return t.forEach(function(n){return zd(n,e)})})}c();c();c();function Xd(t){return t}function Kd(t,r){r===void 0&&(r=Xd);var e=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return e.length?e[e.length-1]:t},useMedium:function(i){var a=r(i,n);return e.push(a),function(){e=e.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(n=!0;e.length;){var a=e;e=[],a.forEach(i)}e={push:function(s){return i(s)},filter:function(){return e}}},assignMedium:function(i){n=!0;var a=[];if(e.length){var s=e;e=[],s.forEach(i),a=e}var l=function(){var f=a;a=[],f.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),e={push:function(f){a.push(f),u()},filter:function(f){return a=a.filter(f),e}}}};return o}function cn(t,r){return r===void 0&&(r=Xd),Kd(t,r)}function qt(t){t===void 0&&(t={});var r=Kd(null);return r.options=et({async:!0,ssr:!1},t),r}c();var qd=P(x()),Yd=function(t){var r=t.sideCar,e=_n(t,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=r.read();if(!n)throw new Error("Sidecar medium not found");return qd.createElement(n,et({},e))};Yd.isSideCarExport=!0;function Yt(t,r){return t.useMedium(r),Yd}var No=qt();var ka=function(){},Vo=Re.forwardRef(function(t,r){var e=Re.useRef(null),n=Re.useState({onScrollCapture:ka,onWheelCapture:ka,onTouchMoveCapture:ka}),o=n[0],i=n[1],a=t.forwardProps,s=t.children,l=t.className,u=t.removeScrollBar,f=t.enabled,p=t.shards,m=t.sideCar,v=t.noIsolation,T=t.inert,g=t.allowPinchZoom,C=t.as,y=C===void 0?"div":C,w=_n(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),k=m,q=sn([e,r]),X=et(et({},w),o);return Re.createElement(Re.Fragment,null,f&&Re.createElement(k,{sideCar:No,removeScrollBar:u,shards:p,noIsolation:v,inert:T,setCallbacks:i,allowPinchZoom:!!g,lockRef:e}),a?Re.cloneElement(Re.Children.only(s),et(et({},X),{ref:q})):Re.createElement(y,et({},X,{className:l,ref:q}),s))});Vo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Vo.classNames={fullWidth:Kt,zeroRight:Xt};c();c();c();function Rr(){return Rr=Object.assign||function(t){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},Rr.apply(this,arguments)}var ie=P(x()),aE=P(Ei());c();var ln="data-focus-lock",Ho="data-focus-lock-disabled",$d="data-no-focus-lock",Jd="data-autofocus-inside",Zd="data-no-autofocus";var tp=P(x());c();var xr=P(x()),Z_=P(Ei()),Or={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},Qd=function(r){var e=r.children;return xr.createElement(xr.Fragment,null,xr.createElement("div",{key:"guard-first","data-focus-guard":!0,"data-focus-auto-guard":!0,style:Or}),e,e&&xr.createElement("div",{key:"guard-last","data-focus-guard":!0,"data-focus-auto-guard":!0,style:Or}))};Qd.propTypes={};Qd.defaultProps={children:null};c();var Fo=cn({},function(t){var r=t.target,e=t.currentTarget;return{target:r,currentTarget:e}}),Bo=cn(),ep=cn(),Wo=qt({async:!0});var zv=[],_a=ie.forwardRef(function(r,e){var n,o=ie.useState(),i=o[0],a=o[1],s=ie.useRef(),l=ie.useRef(!1),u=ie.useRef(null),f=r.children,p=r.disabled,m=r.noFocusGuards,v=r.persistentFocus,T=r.crossFrame,g=r.autoFocus,C=r.allowTextSelection,y=r.group,w=r.className,k=r.whiteList,q=r.hasPositiveIndices,X=r.shards,le=X===void 0?zv:X,M=r.as,U=M===void 0?"div":M,ne=r.lockProps,ye=ne===void 0?{}:ne,L=r.sideCar,j=r.returnFocus,Ne=r.focusOptions,be=r.onActivation,$e=r.onDeactivation,wi=ie.useState({}),Ci=wi[0],Pi=ie.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&be&&be(s.current),l.current=!0},[be]),Ti=ie.useCallback(function(){l.current=!1,$e&&$e(s.current)},[$e]);(0,tp.useEffect)(function(){p||(u.current=null)},[]);var Ri=ie.useCallback(function(Je){var It=u.current;if(It&&It.focus){var S=typeof j=="function"?j(It):j;if(S){var I=typeof S=="object"?S:void 0;u.current=null,Je?Promise.resolve().then(function(){return It.focus(I)}):It.focus(I)}}},[j]),Pn=ie.useCallback(function(Je){l.current&&Fo.useMedium(Je)},[]),xi=Bo.useMedium,Oi=ie.useCallback(function(Je){s.current!==Je&&(s.current=Je,a(Je))},[]),Tn=Rr((n={},n[Ho]=p&&"disabled",n[ln]=y,n),ye),Br=m!==!0,ki=Br&&m!=="tail",_i=sn([e,Oi]);return ie.createElement(ie.Fragment,null,Br&&[ie.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:p?-1:0,style:Or}),q?ie.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:p?-1:1,style:Or}):null],!p&&ie.createElement(L,{id:Ci,sideCar:Wo,observed:i,disabled:p,persistentFocus:v,crossFrame:T,autoFocus:g,whiteList:k,shards:le,onActivation:Pi,onDeactivation:Ti,returnFocus:Ri,focusOptions:Ne}),ie.createElement(U,Rr({ref:_i},Tn,{className:w,onBlur:xi,onFocus:Pn}),f),ki&&ie.createElement("div",{"data-focus-guard":!0,tabIndex:p?-1:0,style:Or}))});_a.propTypes={};_a.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};var rp=_a;c();function Ea(t){var r=window,e=r.setImmediate;typeof e<"u"?e(t):setTimeout(t,1)}var np=rp;c();var jo=qt(),zo="data-focus-on-hidden";var op=at.forwardRef(function(t,r){var e=at.useState(!1),n=e[0],o=e[1],i=t.children,a=t.autoFocus,s=t.shards,l=t.enabled,u=l===void 0?!0:l,f=t.scrollLock,p=f===void 0?!0:f,m=t.focusLock,v=m===void 0?!0:m,T=t.returnFocus,g=T===void 0?!0:T,C=t.inert,y=t.allowPinchZoom,w=t.sideCar,k=t.className,q=t.shouldIgnore,X=t.style,le=t.as,M=Ra(t,["children","autoFocus","shards","enabled","scrollLock","focusLock","returnFocus","inert","allowPinchZoom","sideCar","className","shouldIgnore","style","as"]),U=w,ne=n.onActivation,ye=n.onDeactivation,L=Ra(n,["onActivation","onDeactivation"]),j=Gt(Gt({},L),{sideCar:w,shards:s,allowPinchZoom:y,as:le,inert:C,style:X,enabled:u&&p});return at.createElement(at.Fragment,null,at.createElement(np,{ref:r,sideCar:w,disabled:!(n&&u&&v),returnFocus:g,autoFocus:a,shards:s,onActivation:ne,onDeactivation:ye,className:k,whiteList:q,lockProps:j,as:Vo},i),u&&at.createElement(U,Gt({},M,{sideCar:jo,setLockProps:o,shards:s})))});c();c();c();var Tp=P(x()),P0=P(Ei());c();c();c();function un(t,r){return un=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},un(t,r)}function Ia(t,r){t.prototype=Object.create(r.prototype),t.prototype.constructor=t,un(t,r)}c();function Da(t,r,e){return r in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}var Uo=P(x());function Uv(t,r){function e(n){return n.displayName||n.name||"Component"}return function(o){var i=[],a;function s(){a=t(i.map(function(u){return u.props})),r(a)}var l=function(u){Ia(f,u);function f(){return u.apply(this,arguments)||this}f.peek=function(){return a};var p=f.prototype;return p.componentDidMount=function(){i.push(this),s()},p.componentDidUpdate=function(){s()},p.componentWillUnmount=function(){var v=i.indexOf(this);i.splice(v,1),s()},p.render=function(){return Uo.default.createElement(o,this.props)},f}(Uo.PureComponent);return Da(l,"displayName","SideEffect("+e(o)+")"),l}}var ip=Uv;c();c();c();c();var xe=function(t){for(var r=Array(t.length),e=0;e<t.length;++e)r[e]=t[e];return r},fn=function(t){return Array.isArray(t)?t:[t]};c();var Gv=function(t){if(t.nodeType!==Node.ELEMENT_NODE)return!1;var r=window.getComputedStyle(t,null);return!r||!r.getPropertyValue?!1:r.getPropertyValue("display")==="none"||r.getPropertyValue("visibility")==="hidden"},ap=function(t){return t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?t.parentNode.host:t.parentNode},sp=function(t){return t===document||t&&t.nodeType===Node.DOCUMENT_NODE},Xv=function(t,r){return!t||sp(t)||!Gv(t)&&r(ap(t))},La=function(t,r){var e=t.get(r);if(e!==void 0)return e;var n=Xv(r,La.bind(void 0,t));return t.set(r,n),n},Kv=function(t,r){return t&&!sp(t)?Yv(t)?r(ap(t)):!1:!0},Aa=function(t,r){var e=t.get(r);if(e!==void 0)return e;var n=Kv(r,Aa.bind(void 0,t));return t.set(r,n),n},Ma=function(t){return t.dataset},qv=function(t){return t.tagName==="BUTTON"},cp=function(t){return t.tagName==="INPUT"},Na=function(t){return cp(t)&&t.type==="radio"},lp=function(t){return!((cp(t)||qv(t))&&(t.type==="hidden"||t.disabled))},Yv=function(t){var r=t.getAttribute(Zd);return![!0,"true",""].includes(r)},dn=function(t){var r;return Boolean(t&&((r=Ma(t))===null||r===void 0?void 0:r.focusGuard))},kr=function(t){return!dn(t)},up=function(t){return Boolean(t)};c();var $v=function(t,r){var e=t.tabIndex-r.tabIndex,n=t.index-r.index;if(e){if(!t.tabIndex)return 1;if(!r.tabIndex)return-1}return e||n},Va=function(t,r,e){return xe(t).map(function(n,o){return{node:n,index:o,tabIndex:e&&n.tabIndex===-1?(n.dataset||{}).focusGuard?0:-1:n.tabIndex}}).filter(function(n){return!r||n.tabIndex>=0}).sort($v)};c();c();var fp=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"];var Ha=fp.join(","),Jv="".concat(Ha,", [data-focus-guard]"),dp=function(t,r){var e;return xe(((e=t.shadowRoot)===null||e===void 0?void 0:e.children)||t.children).reduce(function(n,o){return n.concat(o.matches(r?Jv:Ha)?[o]:[],dp(o))},[])},Go=function(t,r){return t.reduce(function(e,n){return e.concat(dp(n,r),n.parentNode?xe(n.parentNode.querySelectorAll(Ha)).filter(function(o){return o===n}):[])},[])},pp=function(t){var r=t.querySelectorAll("[".concat(Jd,"]"));return xe(r).map(function(e){return Go([e])}).reduce(function(e,n){return e.concat(n)},[])};var Fa=function(t,r){return xe(t).filter(function(e){return La(r,e)}).filter(function(e){return lp(e)})},Ba=function(t,r){return r===void 0&&(r=new Map),xe(t).filter(function(e){return Aa(r,e)})},pn=function(t,r,e){return Va(Fa(Go(t,e),r),!0,e)},Wa=function(t,r){return Va(Fa(Go(t),r),!1)},mp=function(t,r){return Fa(pp(t),r)},Ot=function(t,r){return t.shadowRoot?Ot(t.shadowRoot,r):Object.getPrototypeOf(t).contains!==void 0&&Object.getPrototypeOf(t).contains.call(t,r)?!0:xe(t.children).some(function(e){return Ot(e,r)})};c();var Zv=function(t){for(var r=new Set,e=t.length,n=0;n<e;n+=1)for(var o=n+1;o<e;o+=1){var i=t[n].compareDocumentPosition(t[o]);(i&Node.DOCUMENT_POSITION_CONTAINED_BY)>0&&r.add(o),(i&Node.DOCUMENT_POSITION_CONTAINS)>0&&r.add(n)}return t.filter(function(a,s){return!r.has(s)})},hp=function(t){return t.parentNode?hp(t.parentNode):t},_r=function(t){var r=fn(t);return r.filter(Boolean).reduce(function(e,n){var o=n.getAttribute(ln);return e.push.apply(e,o?Zv(xe(hp(n).querySelectorAll("[".concat(ln,'="').concat(o,'"]:not([').concat(Ho,'="disabled"])')))):[n]),e},[])};c();var gp=function(t){return t.activeElement?t.activeElement.shadowRoot?gp(t.activeElement.shadowRoot):t.activeElement:void 0},Er=function(){return document.activeElement?document.activeElement.shadowRoot?gp(document.activeElement.shadowRoot):document.activeElement:void 0};var Qv=function(t){return t===document.activeElement},ey=function(t){return Boolean(xe(t.querySelectorAll("iframe")).some(function(r){return Qv(r)}))},Xo=function(t){var r=document&&Er();return!r||r.dataset&&r.dataset.focusGuard?!1:_r(t).some(function(e){return Ot(e,r)||ey(e)})};c();var ja=function(){var t=document&&Er();return t?xe(document.querySelectorAll("[".concat($d,"]"))).some(function(r){return Ot(r,t)}):!1};c();c();c();var ty=function(t,r){return r.filter(Na).filter(function(e){return e.name===t.name}).filter(function(e){return e.checked})[0]||t},Ko=function(t,r){return Na(t)&&t.name?ty(t,r):t},vp=function(t){var r=new Set;return t.forEach(function(e){return r.add(Ko(e,t))}),t.filter(function(e){return r.has(e)})};c();var za=function(t){return t[0]&&t.length>1?Ko(t[0],t):t[0]},Ua=function(t,r){return t.length>1?t.indexOf(Ko(t[r],t)):r};var Ga="NEW_FOCUS",yp=function(t,r,e,n){var o=t.length,i=t[0],a=t[o-1],s=dn(e);if(!(e&&t.indexOf(e)>=0)){var l=e!==void 0?r.indexOf(e):-1,u=n?r.indexOf(n):l,f=n?t.indexOf(n):-1,p=l-u,m=r.indexOf(i),v=r.indexOf(a),T=vp(r),g=e!==void 0?T.indexOf(e):-1,C=g-(n?T.indexOf(n):l),y=Ua(t,0),w=Ua(t,o-1);if(l===-1||f===-1)return Ga;if(!p&&f>=0)return f;if(l<=m&&s&&Math.abs(p)>1)return w;if(l>=v&&s&&Math.abs(p)>1)return y;if(p&&Math.abs(C)>1)return f;if(l<=m)return w;if(l>v)return y;if(p)return Math.abs(p)>1?f:(o+f+p)%o}};c();var ry=function(t){return function(r){var e,n=(e=Ma(r))===null||e===void 0?void 0:e.autofocus;return r.autofocus||n!==void 0&&n!=="false"||t.indexOf(r)>=0}},bp=function(t,r,e){var n=t.map(function(i){var a=i.node;return a}),o=Ba(n.filter(ry(e)));return o&&o.length?za(o):za(Ba(r))};c();var Ka=function(t,r){return r===void 0&&(r=[]),r.push(t),t.parentNode&&Ka(t.parentNode.host||t.parentNode,r),r},Xa=function(t,r){for(var e=Ka(t),n=Ka(r),o=0;o<e.length;o+=1){var i=e[o];if(n.indexOf(i)>=0)return i}return!1},qo=function(t,r,e){var n=fn(t),o=fn(r),i=n[0],a=!1;return o.filter(Boolean).forEach(function(s){a=Xa(a||s,s)||a,e.filter(Boolean).forEach(function(l){var u=Xa(i,l);u&&(!a||Ot(u,a)?a=u:a=Xa(u,a))})}),a},Sp=function(t,r){return t.reduce(function(e,n){return e.concat(mp(n,r))},[])};var ny=function(t,r){var e=new Map;return r.forEach(function(n){return e.set(n.node,n)}),t.map(function(n){return e.get(n)}).filter(up)},wp=function(t,r){var e=document&&Er(),n=_r(t).filter(kr),o=qo(e||t,t,n),i=new Map,a=Wa(n,i),s=pn(n,i).filter(function(m){var v=m.node;return kr(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=Wa([o],i).map(function(m){var v=m.node;return v}),u=ny(l,s),f=u.map(function(m){var v=m.node;return v}),p=yp(f,l,e,r);return p===Ga?{node:bp(a,f,Sp(n,i))}:p===void 0?p:u[p]}};c();var qa=function(t){var r=_r(t).filter(kr),e=qo(t,t,r),n=new Map,o=pn([e],n,!0),i=pn(r,n).filter(function(a){var s=a.node;return kr(s)}).map(function(a){var s=a.node;return s});return o.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:i.indexOf(s)>=0,guard:dn(s)}})};c();var oy=function(t,r){"focus"in t&&t.focus(r),"contentWindow"in t&&t.contentWindow&&t.contentWindow.focus()},Ya=0,$a=!1,Cp=function(t,r,e){e===void 0&&(e={});var n=wp(t,r);if(!$a&&n){if(Ya>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),$a=!0,setTimeout(function(){$a=!1},1);return}Ya++,oy(n.node,e.focusOptions),Ya--}};var Ja=Cp;var iy=function(){return document&&document.activeElement===document.body},ay=function(){return iy()||ja()},Dr=null,Ir=null,Lr=null,mn=!1,sy=function(){return!0},cy=function(r){return(Dr.whiteList||sy)(r)},ly=function(r,e){Lr={observerNode:r,portaledElement:e}},uy=function(r){return Lr&&Lr.portaledElement===r};function Pp(t,r,e,n){var o=null,i=t;do{var a=n[i];if(a.guard)a.node.dataset.focusAutoGuard&&(o=a);else if(a.lockItem){if(i!==t)return;o=null}else break}while((i+=e)!==r);o&&(o.node.tabIndex=0)}var fy=function(r){return r&&"current"in r?r.current:r},dy=function(r){return r?Boolean(mn):mn==="meanwhile"},py=function t(r,e,n){return e&&(e.host===r&&(!e.activeElement||n.contains(e.activeElement))||e.parentNode&&t(r,e.parentNode,n))},my=function(r,e){return e.some(function(n){return py(r,n,n)})},Yo=function(){var r=!1;if(Dr){var e=Dr,n=e.observed,o=e.persistentFocus,i=e.autoFocus,a=e.shards,s=e.crossFrame,l=e.focusOptions,u=n||Lr&&Lr.portaledElement,f=document&&document.activeElement;if(u){var p=[u].concat(a.map(fy).filter(Boolean));if((!f||cy(f))&&(o||dy(s)||!ay()||!Ir&&i)&&(u&&!(Xo(p)||f&&my(f,p)||uy(f,u))&&(document&&!Ir&&f&&!i?(f.blur&&f.blur(),document.body.focus()):(r=Ja(p,Ir,{focusOptions:l}),Lr={})),mn=!1,Ir=document&&document.activeElement),document){var m=document&&document.activeElement,v=qa(p),T=v.map(function(g){var C=g.node;return C}).indexOf(m);T>-1&&(v.filter(function(g){var C=g.guard,y=g.node;return C&&y.dataset.focusAutoGuard}).forEach(function(g){var C=g.node;return C.removeAttribute("tabIndex")}),Pp(T,v.length,1,v),Pp(T,-1,-1,v))}}}return r},Rp=function(r){Yo()&&r&&(r.stopPropagation(),r.preventDefault())},$o=function(){return Ea(Yo)},xp=function(r){var e=r.target,n=r.currentTarget;n.contains(e)||ly(n,e)},hy=function(){return null},gy=function(r){var e=r.children;return Tp.createElement("div",{onBlur:$o,onFocus:xp},e)};gy.propTypes={};var Op=function(){mn="just",setTimeout(function(){mn="meanwhile"},0)},vy=function(){document.addEventListener("focusin",Rp),document.addEventListener("focusout",$o),window.addEventListener("blur",Op)},yy=function(){document.removeEventListener("focusin",Rp),document.removeEventListener("focusout",$o),window.removeEventListener("blur",Op)};function by(t){return t.filter(function(r){var e=r.disabled;return!e})}function Sy(t){var r=t.slice(-1)[0];r&&!Dr&&vy();var e=Dr,n=e&&r&&r.id===e.id;Dr=r,e&&!n&&(e.onDeactivation(),t.filter(function(o){var i=o.id;return i===e.id}).length||e.returnFocus(!r)),r?(Ir=null,(!n||e.observed!==r.observed)&&r.onActivation(),Yo(!0),Ea(Yo)):(yy(),Ir=null)}Fo.assignSyncMedium(xp);Bo.assignMedium($o);ep.assignMedium(function(t){return t({moveFocusInside:Ja,focusInside:Xo})});var kp=ip(by,Sy)(hy);var A0=Yt(Wo,kp);c();c();var ae=P(x());c();c();var Jo=P(x());c();c();c();var Ip=P(x());c();c();var _p;var Ep=function(){if(_p)return _p;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function wy(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var r=Ep();return r&&t.setAttribute("nonce",r),t}function Cy(t,r){t.styleSheet?t.styleSheet.cssText=r:t.appendChild(document.createTextNode(r))}function Py(t){var r=document.head||document.getElementsByTagName("head")[0];r.appendChild(t)}var Za=function(){var t=0,r=null;return{add:function(e){t==0&&(r=wy())&&(Cy(r,e),Py(r)),t++},remove:function(){t--,!t&&r&&(r.parentNode&&r.parentNode.removeChild(r),r=null)}}};var Qa=function(){var t=Za();return function(r,e){Ip.useEffect(function(){return t.add(r),function(){t.remove()}},[r&&e])}};var $t=function(){var t=Qa(),r=function(e){var n=e.styles,o=e.dynamic;return t(n,o),null};return r};c();var Ty={left:0,top:0,right:0,gap:0},es=function(t){return parseInt(t||"",10)||0},Ry=function(t){var r=window.getComputedStyle(document.body),e=r[t==="padding"?"paddingLeft":"marginLeft"],n=r[t==="padding"?"paddingTop":"marginTop"],o=r[t==="padding"?"paddingRight":"marginRight"];return[es(e),es(n),es(o)]},ts=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return Ty;var r=Ry(t),e=document.documentElement.clientWidth,n=window.innerWidth;return{left:r[0],top:r[1],right:r[2],gap:Math.max(0,n-e+r[2]-r[0])}};var xy=$t(),Oy=function(t,r,e,n){var o=t.left,i=t.top,a=t.right,s=t.gap;return e===void 0&&(e="margin"),`
  .`.concat(xa,` {
   overflow: hidden `).concat(n,`;
   padding-right: `).concat(s,"px ").concat(n,`;
  }
  body {
    overflow: hidden `).concat(n,`;
    overscroll-behavior: contain;
    `).concat([r&&"position: relative ".concat(n,";"),e==="margin"&&`
    padding-left: `.concat(o,`px;
    padding-top: `).concat(i,`px;
    padding-right: `).concat(a,`px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(s,"px ").concat(n,`;
    `),e==="padding"&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),`
  }
  
  .`).concat(Xt,` {
    right: `).concat(s,"px ").concat(n,`;
  }
  
  .`).concat(Kt,` {
    margin-right: `).concat(s,"px ").concat(n,`;
  }
  
  .`).concat(Xt," .").concat(Xt,` {
    right: 0 `).concat(n,`;
  }
  
  .`).concat(Kt," .").concat(Kt,` {
    margin-right: 0 `).concat(n,`;
  }
  
  body {
    `).concat(Oa,": ").concat(s,`px;
  }
`)},rs=function(t){var r=t.noRelative,e=t.noImportant,n=t.gapMode,o=n===void 0?"margin":n,i=Jo.useMemo(function(){return ts(o)},[o]);return Jo.createElement(xy,{styles:Oy(i,!r,o,e?"":"!important")})};c();var ns=!1;if(typeof window<"u")try{hn=Object.defineProperty({},"passive",{get:function(){return ns=!0,!0}}),window.addEventListener("test",hn,hn),window.removeEventListener("test",hn,hn)}catch(t){ns=!1}var hn,Jt=ns?{passive:!1}:!1;c();var ky=function(t){return t.tagName==="TEXTAREA"},Dp=function(t,r){var e=window.getComputedStyle(t);return e[r]!=="hidden"&&!(e.overflowY===e.overflowX&&!ky(t)&&e[r]==="visible")},_y=function(t){return Dp(t,"overflowY")},Ey=function(t){return Dp(t,"overflowX")},os=function(t,r){var e=r;do{typeof ShadowRoot<"u"&&e instanceof ShadowRoot&&(e=e.host);var n=Lp(t,e);if(n){var o=Ap(t,e),i=o[1],a=o[2];if(i>a)return!0}e=e.parentNode}while(e&&e!==document.body);return!1},Iy=function(t){var r=t.scrollTop,e=t.scrollHeight,n=t.clientHeight;return[r,e,n]},Dy=function(t){var r=t.scrollLeft,e=t.scrollWidth,n=t.clientWidth;return[r,e,n]},Lp=function(t,r){return t==="v"?_y(r):Ey(r)},Ap=function(t,r){return t==="v"?Iy(r):Dy(r)},Ly=function(t,r){return t==="h"&&r==="rtl"?-1:1},Mp=function(t,r,e,n,o){var i=Ly(t,window.getComputedStyle(r).direction),a=i*n,s=e.target,l=r.contains(s),u=!1,f=a>0,p=0,m=0;do{var v=Ap(t,s),T=v[0],g=v[1],C=v[2],y=g-C-i*T;(T||y)&&Lp(t,s)&&(p+=y,m+=T),s=s.parentNode}while(!l&&s!==document.body||l&&(r.contains(s)||r===s));return(f&&(o&&p===0||!o&&a>p)||!f&&(o&&m===0||!o&&-a>m))&&(u=!0),u};var Zo=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Np=function(t){return[t.deltaX,t.deltaY]},Vp=function(t){return t&&"current"in t?t.current:t},Ay=function(t,r){return t[0]===r[0]&&t[1]===r[1]},My=function(t){return`
  .block-interactivity-`.concat(t,` {pointer-events: none;}
  .allow-interactivity-`).concat(t,` {pointer-events: all;}
`)},Ny=0,Ar=[];function Hp(t){var r=ae.useRef([]),e=ae.useRef([0,0]),n=ae.useRef(),o=ae.useState(Ny++)[0],i=ae.useState(function(){return $t()})[0],a=ae.useRef(t);ae.useEffect(function(){a.current=t},[t]),ae.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(o));var g=Ls([t.lockRef.current],(t.shards||[]).map(Vp),!0).filter(Boolean);return g.forEach(function(C){return C.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(o))})}}},[t.inert,t.lockRef.current,t.shards]);var s=ae.useCallback(function(g,C){if("touches"in g&&g.touches.length===2)return!a.current.allowPinchZoom;var y=Zo(g),w=e.current,k="deltaX"in g?g.deltaX:w[0]-y[0],q="deltaY"in g?g.deltaY:w[1]-y[1],X,le=g.target,M=Math.abs(k)>Math.abs(q)?"h":"v";if("touches"in g&&M==="h"&&le.type==="range")return!1;var U=os(M,le);if(!U)return!0;if(U?X=M:(X=M==="v"?"h":"v",U=os(M,le)),!U)return!1;if(!n.current&&"changedTouches"in g&&(k||q)&&(n.current=X),!X)return!0;var ne=n.current||X;return Mp(ne,C,g,ne==="h"?k:q,!0)},[]),l=ae.useCallback(function(g){var C=g;if(!(!Ar.length||Ar[Ar.length-1]!==i)){var y="deltaY"in C?Np(C):Zo(C),w=r.current.filter(function(X){return X.name===C.type&&X.target===C.target&&Ay(X.delta,y)})[0];if(w&&w.should){C.cancelable&&C.preventDefault();return}if(!w){var k=(a.current.shards||[]).map(Vp).filter(Boolean).filter(function(X){return X.contains(C.target)}),q=k.length>0?s(C,k[0]):!a.current.noIsolation;q&&C.cancelable&&C.preventDefault()}}},[]),u=ae.useCallback(function(g,C,y,w){var k={name:g,delta:C,target:y,should:w};r.current.push(k),setTimeout(function(){r.current=r.current.filter(function(q){return q!==k})},1)},[]),f=ae.useCallback(function(g){e.current=Zo(g),n.current=void 0},[]),p=ae.useCallback(function(g){u(g.type,Np(g),g.target,s(g,t.lockRef.current))},[]),m=ae.useCallback(function(g){u(g.type,Zo(g),g.target,s(g,t.lockRef.current))},[]);ae.useEffect(function(){return Ar.push(i),t.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Jt),document.addEventListener("touchmove",l,Jt),document.addEventListener("touchstart",f,Jt),function(){Ar=Ar.filter(function(g){return g!==i}),document.removeEventListener("wheel",l,Jt),document.removeEventListener("touchmove",l,Jt),document.removeEventListener("touchstart",f,Jt)}},[]);var v=t.removeScrollBar,T=t.inert;return ae.createElement(ae.Fragment,null,T?ae.createElement(i,{styles:My(o)}):null,v?ae.createElement(rs,{gapMode:"margin"}):null)}var RD=Yt(No,Hp);c();var ti=P(x());c();var Vy=function(t){if(typeof document>"u")return null;var r=Array.isArray(t)?t[0]:t;return r.ownerDocument.body},Mr=new WeakMap,Qo=new WeakMap,ei={},is=0,Hy=function(t,r,e,n){var o=Array.isArray(t)?t:[t];ei[e]||(ei[e]=new WeakMap);var i=ei[e],a=[],s=new Set,l=new Set(o),u=function(p){!p||s.has(p)||(s.add(p),u(p.parentNode))};o.forEach(u);var f=function(p){!p||l.has(p)||Array.prototype.forEach.call(p.children,function(m){if(s.has(m))f(m);else{var v=m.getAttribute(n),T=v!==null&&v!=="false",g=(Mr.get(m)||0)+1,C=(i.get(m)||0)+1;Mr.set(m,g),i.set(m,C),a.push(m),g===1&&T&&Qo.set(m,!0),C===1&&m.setAttribute(e,"true"),T||m.setAttribute(n,"true")}})};return f(r),s.clear(),is++,function(){a.forEach(function(p){var m=Mr.get(p)-1,v=i.get(p)-1;Mr.set(p,m),i.set(p,v),m||(Qo.has(p)||p.removeAttribute(n),Qo.delete(p)),v||p.removeAttribute(e)}),is--,is||(Mr=new WeakMap,Mr=new WeakMap,Qo=new WeakMap,ei={})}},Fp=function(t,r,e){e===void 0&&(e="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),o=r||Vy(t);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),Hy(n,o,e,"aria-hidden")):function(){return null}};c();var Bp=P(x());var Fy=$t(),By=`
 [`+zo+`] {
   pointer-events: none !important;
 }
`,Wp=function(){return Bp.createElement(Fy,{styles:By})};var kt=P(x()),jp=function(t){return"current"in t?t.current:t};function zp(t){var r=t.setLockProps,e=t.onEscapeKey,n=t.onClickOutside,o=t.shards,i=t.onActivation,a=t.onDeactivation,s=t.noIsolation,l=(0,kt.useState)(void 0),u=l[0],f=l[1],p=(0,kt.useRef)(null),m=(0,kt.useRef)(0);return ti.useEffect(function(){var v=function(y){y.defaultPrevented||(y.code==="Escape"||y.key==="Escape"||y.keyCode===27)&&e&&e(y)},T=function(y){y.defaultPrevented||y.target===p.current||y instanceof MouseEvent&&y.button!==0||o&&o.map(jp).some(function(w){return w&&w.contains(y.target)||w===y.target})||n&&n(y)},g=function(y){T(y),m.current=y.touches.length},C=function(y){m.current=y.touches.length};if(u)return document.addEventListener("keydown",v),document.addEventListener("mousedown",T),document.addEventListener("touchstart",g),document.addEventListener("touchend",C),function(){document.removeEventListener("keydown",v),document.removeEventListener("mousedown",T),document.removeEventListener("touchstart",g),document.removeEventListener("touchend",C)}},[u,n,e]),(0,kt.useEffect)(function(){if(u)return i&&i(u),function(){a&&a()}},[!!u]),(0,kt.useEffect)(function(){var v=function(){return null},T=!1,g=function(y){s||(v=Fp(jd([y],(o||[]).map(jp)),document.body,zo)),f(function(){return y})},C=function(){v(),T||f(null)};return r({onMouseDown:function(y){p.current=y.target},onTouchStart:function(y){p.current=y.target},onActivation:g,onDeactivation:C}),function(){T=!0,r(!1)}},[]),ti.createElement(Wp,null)}var Up=Yt(jo,zp);var Wy=function(t){return gn.createElement(Up,Gt({},t))},as=gn.forwardRef(function(t,r){return gn.createElement(op,Gt({},t,{ref:r,sideCar:Wy}))});Y();var rm=P(tm());function nm(t){let r=Oe.useRef(null),[e,n]=tt(Tl),{medias:o,currentIndex:i}=e,a=()=>{n({medias:[],currentIndex:0})},s=()=>{n(f=>({...f,currentIndex:Math.max(f.currentIndex-1,0)}))},l=()=>{n(f=>({...f,currentIndex:Math.min(f.currentIndex+1,f.medias.length-1)}))},u=f=>{n(p=>({...p,currentIndex:f}))};return Fn({opened:o.length>0,closeOnClick:!1,closeOnOutsideClick:!1,closeOnScroll:!1,closeOnEsc:!0,onClose:a},r),Jn(o.length?{Left:()=>s(),Right:()=>l()}:{},"all",[n,!o.length]),o.length?Oe.createElement(yt,{ref:r},Oe.createElement(as,null,Oe.createElement(b,{style:Nr.imagesZoonPortal},Oe.createElement(rm.default,{imageUrls:o.map(f=>({url:f.url})),index:i,renderIndicator:f=>Oe.createElement(b,{style:Nr.indactor},Oe.createElement(b,{style:Nr.indicatorElement}),Oe.createElement(b,{style:[Nr.indicatorElement,h.alignCenter,h.justifyContentCenter]},Oe.createElement(ee,{style:Nr.indicatorText},`${f}/${o.length}`)),Oe.createElement(b,{style:[Nr.indicatorElement,h.alignEnd,h.justifyContentCenter]},Oe.createElement(ge,{icon:z.X,defaultTextStyle:{color:ct.WHITE},onPress:()=>a()}))),renderArrowLeft:()=>Oe.createElement(ge,{icon:z.ChevronLeft,defaultTextStyle:{color:ct.WHITE},onPress:()=>s()}),renderArrowRight:()=>Oe.createElement(ge,{icon:z.ChevronRight,defaultTextStyle:{color:ct.WHITE},onPress:()=>l()}),onChange:f=>u(f),onCancel:()=>a(),enableSwipeDown:!0})))):null}var Nr=pe.create({imagesZoonPortal:{position:"fixed",top:0,left:0,right:0,bottom:0},indactor:{height:48,position:"absolute",left:0,top:0,right:0,display:"flex",flexDirection:"row",zIndex:20},indicatorElement:{flex:1},indicatorText:{color:ct.WHITE}});c();var ms=P(x());function om(t){let{active:r=!0,interactive:e=!1,size:n,rating:o}=t,[,i]=_(nb),a=rb[o];return ms.createElement(te.View,{style:[i.ratingIcon,{width:n,height:n,borderRadius:n}],inactiveStyle:r?i[o]:i.inactiveButton,activeStyle:e?i[o]:null},ms.createElement(a.Child,{size:.75*n,activeStyle:e?i.activeIcon:null,style:r&&i.activeIcon}))}var rb={["ok"]:te.createInteractiveComponent(z.FeedbackOk),["good"]:te.createInteractiveComponent(z.FeedbackGood),["bad"]:te.createInteractiveComponent(z.FeedbackBad)},nb=A.create({ratingIcon:{borderRadius:O.BUTTON_S,alignItems:"center",justifyContent:"center"},inactiveButton:t=>({backgroundColor:t.colors.background.mid,color:t.colors.text.mid}),activeIcon:t=>({color:t.colors.primary.textInside}),["ok"]:t=>({backgroundColor:t.colors.warning.main}),["good"]:t=>({backgroundColor:t.colors.success.main}),["bad"]:t=>({backgroundColor:t.colors.danger.main})});c();var me=P(x());Y();var ob=Fe("app:crash");function yn(t){let{children:r}=t,e=me.useCallback((n,o,i)=>{ob.emergency(`An error occured during rendering:

`,n,`

The error is located at:
`,o),nr({type:"crash",crashType:hs(n),sentryEvent:i})},[]);return me.createElement(Vs,{fallback:n=>me.createElement(ib,{...n}),onError:e,beforeCapture:cb},r)}function ib(t){let{eventId:r,error:e}=t,[,n]=_(lb),o=()=>{Ns({eventId:r})},i=()=>{window.location.reload()};me.useEffect(()=>{let s=document.querySelector(".gitbook-splashscreen");s==null||s.remove()},[]);let a=()=>{switch(hs(e)){case"network-crash":return me.createElement(sb,{onReload:i,...t});case"crash":default:return me.createElement(ab,{onShareFeedback:o,onReload:i,...t})}};return me.createElement(b,{style:[n.background]},a())}function ab(t){let r=oe(),{onReload:e,onShareFeedback:n}=t;return me.createElement(Xr,{title:r("something_wrong"),action:me.createElement(me.Fragment,null,me.createElement(ge,{kind:"primary",size:"medium",onPress:e,style:d.Margin.smallRight},r("reload")),me.createElement(ge,{kind:"secondary",size:"medium",onPress:n},r("let_us_know")))},r("we_have_been_notified"))}function sb(t){let{onReload:r}=t,[,e]=_(K),n=oe(),o=()=>{window.open("https://docs.gitbook.com/resources/firewall-safelist","_blank")};return me.createElement(Xr,{title:n("connection_lost"),icon:me.createElement(z.CloudOff,{size:O.ICON_S,style:e.text}),action:me.createElement(me.Fragment,null,me.createElement(ge,{kind:"primary",size:"medium",onPress:r,style:d.Margin.smallRight},n("reload")),me.createElement(ge,{size:"medium",icon:z.Link,onPress:o},n("network_troubleshooting")))},n("device_offline"))}function cb(t,r){switch(hs(r)){case"network-crash":t.setTag("error_category","network-crash");break;case"crash":default:t.setTag("error_category","react-crash")}}function hs(t){return t.name==="FirebaseError"&&t.code==="unavailable"?"network-crash":"crash"}var lb=A.create({background:t=>({backgroundColor:t.colors.background.main,minHeight:"100vh"})});c();var am=P(x());c();var im=P(x());function gs(t){let[r,{close:e,setQuery:n}]=Ft(),o=zc(),i=Sc(1e3);return Xc(a=>{if(!a||!!a.position){typeof r<"u"&&(i.cancel(),e());return}a.query.text!==r&&i(()=>n(a.query.text))}),im.useEffect(()=>{if(typeof r<"u"&&!o.opened){o.open(),o.typeQuery(r);return}},[o,r]),null}c();var Me=P(x());c();var vs=P(x());function ai(t){let{children:r,ssrRequestPath:e,ssrRouterContext:n}=t;return n?vs.createElement(Pu,{location:e,context:n},r):vs.createElement(ta,null,r)}c();var si=P(x());function sm(t="https://policies.gitbook.com/privacy/cookies",r=!1){let e=Gn(),n=oe();si.useEffect(()=>{if(!r)return;let o=!1;if(Mn()!==null)return;let i=e.notify({title:n("cookies"),details:n("cookie_prompt",si.createElement(Xn,{url:t},n("cookie_policy"))),timeout:0,icon:z.Cookies,actions:[{label:n("reject_all"),onPress:()=>{o=!0,Vi(!1),i()}}],onClose:()=>{o||Vi(!0)}})},[])}c();var N=P(x());Y();c();var cm=P(x());Y();function lm(t){let{children:r,style:e}=t;return cm.createElement(b,{style:[ub.container,e]},r)}var ub=pe.create({container:{display:"flex",flexDirection:"row",width:"100%",maxWidth:1510,marginHorizontal:"auto",paddingHorizontal:d.small}});c();var mt=P(x());Y();function um(t){let[,{open:r}]=Ft(),e=oe();return mt.createElement(ge,{icon:z.SearchPublic,size:"medium",kind:t.headerTheme==="bold"?"default_bold":"default",alignItems:"start",onPress:r,style:[d.Padding.noneHorizontal],accessibilityLabel:e("search")})}function ci(t){let{headerTheme:r}=t,[,{open:e}]=Ft(),n=oe(),[,o]=_(K),[,i]=_(fb),a=Nn(),s=Vn(),l=r==="bold"?o.text:o.textMid,u=()=>r==="bold"?s.color==="light"?"rgba(255, 255, 255, 0.15)":"rgba(0, 0, 0, 0.15)":s.color==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.10)";return mt.createElement(te.TouchableOpacity,{style:[{backgroundColor:u()},i.searchBarButton,h.directionRow,h.justifySpaceBetween,h.alignCenter,d.Padding.mediumLeft,d.Padding.smallRight],activeStyle:i.searchBarButtonActive,accessibilityLabel:n("search"),onPress:e},mt.createElement(b,{style:[h.directionRow,h.alignCenter]},mt.createElement(z.SearchPublic,{size:O.ICON_XS,style:[l,d.Margin.smallRight]}),mt.createElement(te.Text.Child,{style:[o.Label,l],activeStyle:o.text},n("search"))),mt.createElement(b,null,mt.createElement(lt,{theme:r==="bold"?a:s},mt.createElement(Bn,{kind:"main",shortcut:$n.PALETTE_OPEN}))))}var fb=A.create({searchBarButton:t=>({width:"100%",height:O.BUTTON_L,borderRadius:t.radiuses.large,borderWidth:1,borderColor:"transparent"}),searchBarButtonActive:t=>({borderColor:t.colors.border.mid})});c();var ke=P(x());Y();var{TOC_DESKTOP_WIDTH:db}=sr,pb=D.createResponsiveComponent(He),mb=te.createInteractiveComponent(pb),ys=db-d.large-d.large;function li(t){var m;let{space:r,collection:e,mobileStyle:n,desktopStyle:o}=t,[,i]=_(K),{getNavigationLinkProps:a}=wt(),s=(e?(e==null?void 0:e.publishedTitle)||(e==null?void 0:e.title):r.publishedTitle||r.title)||Mt,l=s.length>14,u=l?2:1,p=Al(r)&&(m=e==null?void 0:e.logoURL)!=null?m:r.logoURL;return ke.createElement(mb,{style:[h.directionRow,h.alignCenter],mobileStyle:n,desktopStyle:o,...a({screen:{space:r.key,page:""}}),testID:"public.headerHomeLink",accessibilityLabel:s},p?ke.createElement(D.View,{style:[h.flex1,h.directionRow,h.alignCenter,bn.headerDesktop],mobileStyle:bn.logoMobile,desktopStyle:bn.logoDesktop},ke.createElement(D.View,{desktopStyle:"visible",mobileStyle:"hidden"},ke.createElement(ra,{src:Kr(p,{height:40,fit:"contain"}),bestHeight:40,maxWidth:ys})),ke.createElement(D.View,{desktopStyle:"hidden",mobileStyle:"visible"},ke.createElement(ra,{src:Kr(p,{height:30,fit:"contain"}),bestHeight:30,maxWidth:ys}))):ke.createElement(b,{style:[bn.headerDesktop,h.flex1,h.directionRow,h.justifyContentStart,h.alignCenter]},ke.createElement(b,null,ke.createElement(D.View,{mobileStyle:"hidden",desktopStyle:"visible"},ke.createElement(Wi,{content:e||r,renderFor:"public-content",size:O.BUTTON_L,style:[d.Margin.mediumRight]})),ke.createElement(D.View,{mobileStyle:"visible",desktopStyle:"hidden"},ke.createElement(Wi,{content:e||r,renderFor:"public-content",size:O.ICON_XL,style:[d.Margin.mediumRight]}))),ke.createElement(D.Text,{style:bn.textOverflow,mobileStyle:[i.Heading3],desktopStyle:[l?i.Heading3:i.Heading2]},ke.createElement(te.Text.Child,{numberOfLines:u,ellipsizeMode:"tail",inactiveStyle:i.text,activeStyle:t.space.headerTheme==="bold"?i.textStandout:i.primary},s))))}var bn=pe.create({textOverflow:{overflow:"hidden"},logoMobile:{height:30},logoDesktop:{height:40},headerDesktop:{maxWidth:ys}});c();var er=P(x());Y();c();c();var Ae=P(x());Y();var hb=D.createResponsiveComponent(te.TouchableOpacity),gb=te.createInteractiveComponent(D.View);function ui(t){return`hsla(${pc(t.colors.text.primary).h}, 60%, 70%, 0.1)`}var fm=Ae.forwardRef(function(r,e){let{isLast:n,leftIcon:o,icon:i,rightIcon:a,kind:s="primary",children:l,expanded:u=!1,onChevronPress:f,active:p=!1,onPress:m,textStyle:v,href:T}=r,g=te.useInteractiveState(),[C,y]=_(vb),[,w]=_(K),k=s==="primary"?w.textMid:w.textMuted,q=p?w.primary:k,X=m?hb:gb,le=u?z.ChevronDown:z.ChevronRight;return Ae.createElement(X,{ref:e,...g.events,style:[y.tocMenuItem,d.Padding.smallHorizontal,d.Margin.smallRight,n?null:d.Margin.xsmallBottom,p?{backgroundColor:ui(C)}:null],hoverStyle:m&&!p?y.tocMenuItemHovered:null,mobileStyle:y.tocMenuItemMobile,desktopStyle:y.tocMenuItemDesktop,onPress:m,href:T&&m?T:void 0},o?Ae.createElement(b,{style:[d.Margin.mediumRight]},Ae.createElement(o,{size:O.ICON_M,style:[q,v]})):null,i?Ae.createElement(b,{style:[d.Margin.mediumRight]},Ae.createElement(i,{size:O.ICON_M,style:[q,v]})):null,Ae.createElement(ee,{style:[h.flex1,d.Padding.xsmallVertical,s==="group"?w.GroupTitle:w.Label,q,v,p?w.Bold:null]},l),f?Ae.createElement(He,{style:[h.directionRow,h.alignCenter],onPress:f},Ae.createElement(le,{size:O.ICON_S,style:q})):null,a?Ae.createElement(b,{style:y.tocMenuItemRightIcon},Ae.createElement(a,{size:O.ICON_M,style:w.textMuted})):null)}),vb=A.create({tocMenuItem:t=>({flexDirection:"row",alignItems:"center",borderColor:"transparent",borderWidth:1,borderRadius:t.radiuses.medium,minHeight:O.XS}),tocMenuItemMobile:{borderRightWidth:1},tocMenuItemDesktop:{borderRightWidth:0},tocMenuItemHovered:t=>({backgroundColor:t.colors.background.standout}),tocMenuItemRightIcon:{marginLeft:d.small,marginRight:(O.S-O.ICON_M)/2}});c();var Hr=P(x());c();var Ke=P(x());Y();c();var Xe=P(x());Y();var dm=P(fu());var bs=40,yb=te.createInteractiveComponent(kc);function Vr(t){return Xe.createElement(Vt,null,Xe.createElement(bb,{...t}))}function bb(t){let{space:r,floating:e}=t,[n,o]=_(Sb),[,i]=_(K),a=oe(),s=r.organization?Qs(r.organization):null,[l]=wl([s]),u=new URLSearchParams({utm_source:"content",utm_medium:"trademark",utm_campaign:r.key,...l?{"powered-by":l.title}:{}}),f=`https://${Qe.homepage.domain}/?${u.toString()}`,p=()=>{nr(An(r,{type:"public_content_click_trademark"}))};return Xe.createElement(b,{style:e&&o.floatingWrapper},e?Xe.createElement(dm.default,{colors:[`${n.colors.background.main}00`,n.colors.background.main],style:o.floatingTopGradient}):null,Xe.createElement(b,{style:e&&[d.Padding.mediumHorizontal,d.Padding.mediumBottom,o.floatingBackground]},Xe.createElement(te.TouchableOpacity,{style:[h.directionRow,h.alignCenter,...e?[o.trademarkFloating,d.Padding.smallVertical,d.Padding.mediumHorizontal]:[o.tradeMarkDefault]],activeStyle:i.primary,onPress:p,href:f,target:"_blank"},Xe.createElement(yb,{size:bs,style:i.textMuted,activeStyle:i.primary}),Xe.createElement(b,{style:[h.flex1,d.Padding.mediumLeft]},Xe.createElement(te.Text.Child,{style:[i.Label,i.textMuted],activeStyle:i.primary},a("powered_by",Xe.createElement(vd,{style:i.Bold},"GitBook")))))))}var Sb=A.create({floatingWrapper:{position:"absolute",bottom:0,zIndex:1,width:"100%"},floatingTopGradient:{height:d.medium},floatingBackground:t=>({backgroundColor:t.colors.background.main}),tradeMarkDefault:t=>({backgroundColor:"transparent"}),trademarkFloating:t=>({backgroundColor:t.colors.background.standout,borderRadius:t.radiuses.xlarge})});c();var wb=750,Cb=d.xxlarge,pm=wb+2*Cb,fi=300,Pb=220;function mm(t=0){return t+fi+pm+Pb}function hm(t){let r=`(100vw - ${pm}px) / 2 - ${t||0}px`;return`max(${fi}px, calc(${r}))`}c();var Sn=P(x());Y();c();var Ce=P(x());Y();function Ss(t){return Ce.createElement(Ce.Suspense,{fallback:Ce.createElement(gm,{...t})},Ce.createElement(Tb,{...t}))}function Tb(t){let{revision:r,treePage:e}=t,{page:n}=e,o=cr(n.kind==="link"?n.ref:void 0,{space:r.space,revision:r.key});return Ce.createElement(gm,{...t,contentRef:o})}function gm(t){let{revision:r,treePage:e,parent:n,currentPage:o,contentRef:i,isLastPage:a}=t,{page:s}=e,{getNavigationHref:l,navigateToPage:u}=xl(),f=o?o.key:null,p=f===s.key,m=!!f&&Ks(r,s.key,f),[v,T]=Ce.useState(m),[,g]=_(Rb),C=y=>{y.isDefaultPrevented()||y.nativeEvent.metaKey||y.nativeEvent.ctrlKey||(y.preventDefault(),s.kind==="sheet"?u(r,s.key):s.kind==="link"&&(i==null||i.open()))};return Ce.useEffect(()=>{m&&T(!0)},[m]),Ce.createElement(b,{style:[s.kind==="group"&&d.Margin.mediumVertical]},Ce.createElement(fm,{isLast:a,kind:s.kind==="group"?"group":!n||n.kind==="group"?"primary":"secondary",icon:s.emoji?Hn(jn,{code:s.emoji}):void 0,rightIcon:s.kind==="link"?i?i.secondaryIcon:gt:void 0,active:p,expanded:v,onPress:s.kind==="group"?void 0:C,href:(()=>s.kind==="link"?i==null?void 0:i.href:l(r,s.key))(),onChevronPress:e.pages.length>0&&s.kind==="sheet"?y=>{y.preventDefault(),T(w=>!w)}:void 0},s.title),(v||s.kind==="group")&&e.pages.length>0?Ce.createElement(b,{style:[g.tocItemChildren,...s.kind==="group"?[d.Margin.noneLeft]:[d.Margin.smallLeft,d.Margin.xsmallTop,d.Margin.smallBottom]]},e.pages.map((y,w)=>Ce.createElement(b,{style:s.kind==="group"?null:d.Margin.smallLeft,key:y.renderKey},Ce.createElement(Ss,{...t,treePage:y,isLastPage:w===e.pages.length-1,parent:s}))),s.kind==="group"?null:Ce.createElement(b,{style:g.tocItemChildrenLine})):null)}var Rb=A.create({tocItemChildren:{position:"relative"},tocItemChildrenLine:t=>({position:"absolute",top:0,bottom:0,left:0,width:1,backgroundColor:t.colors.border.main})});function di(t){let{showingTrademark:r,revision:e}=t,n=Sn.useMemo(()=>Zs(e.pages,e.rootPages),[e]);return Sn.createElement(On,{style:h.flex1,contentContainerStyle:[d.Padding.mediumVertical,r?xb.scrollviewWithTrademark:null]},n.map((o,i)=>Sn.createElement(Ss,{key:o.renderKey,...t,treePage:o,isLastPage:i===n.length-1})))}var xb=pe.create({scrollviewWithTrademark:{paddingBottom:d.medium+bs+2*d.medium}});c();var we=P(x());Y();function pi(t){let{space:r,collection:e,collectionSpaces:n,currentPage:o,revision:i}=t,[,a]=_(ws),s=n&&(e==null?void 0:e.publishingType)==="variants"?we.createElement(mi,{key:"variants-picker",currentVariant:r,collection:e,variants:n,revision:i,currentPage:o}):null;return we.createElement(we.Fragment,null,we.createElement(Ob,{key:"mobile-closing-bar",variantsSwitcher:s}),r.headerTheme==="none"?we.createElement(we.Fragment,null,we.createElement(kb,{key:"space-header",space:r,collection:e,variantsSwitcher:s}),we.createElement(D.View,{mobileStyle:"hidden",desktopStyle:"visible",style:[a.searchBarSection,d.Padding.smallTop,d.Padding.mediumBottom,d.Padding.smallRight,d.Padding.noneLeft,h.directionRow]},we.createElement(ci,{key:"search-bar"}))):null)}function Ob(t){let[,r]=_(ws),e=ar(tt(br),we.useState(!1));return we.createElement(D.View,{style:[r.mobileClosingBar,d.Padding.smallHorizontal,h.justifySpaceBetween,h.alignCenter,h.directionRow],mobileStyle:"visible",desktopStyle:"hidden"},we.createElement(ge,{icon:z.X,size:"large",kind:"default",onPress:()=>e.closeMobile(),style:[h.alignSelfCenter,d.Padding.smallHorizontal],accessibilityLabel:"Close"}),t.variantsSwitcher)}function kb(t){let{space:r,collection:e,variantsSwitcher:n}=t,[,o]=_(ws);return we.createElement(D.View,{style:[o.spaceTitleWrapper,h.directionRow,h.justifyContentCenter,h.alignCenter],mobileStyle:"hidden",desktopStyle:"visible"},we.createElement(li,{space:r,collection:e,desktopStyle:h.flex1}),we.createElement(b,{style:[h.alignSelfCenter,d.Margin.smallHorizontal]},n))}var ws=A.create({searchBarSection:t=>({borderColor:t.colors.border.mid,borderBottomWidth:1}),selectedTab:t=>({borderLeftColor:t.colors.primary.main,borderLeftWidth:2}),hoverTab:t=>({backgroundColor:t.colors.background.standout}),tab:{width:"100%",flexDirection:"row",justifyContent:"center",alignItems:"center",outlineStyle:"none",borderWidth:0,borderColor:"transparent",borderLeftWidth:2,height:O.BUTTON_M,lineHeight:O.BUTTON_M,borderRadius:0,paddingHorizontal:d.medium},mainBadge:{fontFamily:uc,fontSize:fc.xxsmall,lineHeight:O.BUTTON_M,...dc.Bold,textTransform:"uppercase",letterSpacing:1},spaceTitleWrapper:t=>({height:O.L}),mobileClosingBar:t=>({height:O.L,borderBottomWidth:1,borderBottomColor:t.colors.border.mid,backgroundColor:t.colors.background.main}),variantScrollView:{flexGrow:0,flexShrink:1,height:"fit-content"}});var Cs=O.XL;function vm(t){let{space:r}=t,e=oe(),n=En(r.headerTheme,r.themeMode),[,o]=_(_b[n]),{desktopSidebarWidth:i}=Ke.useContext(ll),a=Ke.useMemo(()=>({[mm(i)]:"visible"}),[i]),s=!r.hideTrademark;return Ke.createElement(D.View,{testID:"page.desktopTableOfContents",mobileStyle:"hidden",desktopStyle:"visible",customBreakpointsStyles:a,style:[o.tocDesktopWrapper,h.directionRow,{width:hm(i)},h.justifyContentEnd]},Ke.createElement(bt,{tag:"nav",accessibilityLabel:e("table_of_contents"),style:[Eb.tocDesktop,h.directionColumn]},Ke.createElement(b,{style:[h.flex1,d.Padding.largeLeft]},Ke.createElement(pi,{...t}),Ke.createElement(di,{...t,showingTrademark:s})),s?Ke.createElement(Vr,{floating:!0,space:r}):null))}var _b={none:A.create({tocDesktopWrapper:t=>({position:"sticky",top:0,height:"100vh",overflowY:"auto",alignSelf:"flex-start",backgroundColor:t.colors.background.main,borderRightColor:t.colors.border.mid,borderRightWidth:1})}),light:A.create({tocDesktopWrapper:t=>({position:"sticky",top:d.xxlarge,height:`calc(100vh - ${Cs}px)`,overflowY:"auto",alignSelf:"flex-start",backgroundColor:t.colors.background.main,borderRightColor:t.colors.border.mid,borderRightWidth:1})}),dark:A.create({tocDesktopWrapper:t=>({position:"sticky",top:d.xxlarge,height:`calc(100vh - ${Cs}px)`,overflowY:"auto",alignSelf:"flex-start",backgroundColor:t.colors.background.main,borderRightColor:t.colors.border.mid,borderRightWidth:1})}),bold:A.create({tocDesktopWrapper:t=>({position:"sticky",top:d.xxlarge,height:`calc(100vh - ${Cs}px)`,overflowY:"auto",alignSelf:"flex-start",backgroundColor:t.colors.background.main,borderRightColor:t.colors.border.mid,borderRightWidth:1})})},Eb=pe.create({tocDesktop:{width:fi}});c();var Ee=P(x());Y();var Ib=D.createResponsiveComponent(Dt.View),Db=D.createResponsiveComponent(Dt.createAnimatedComponent(He));function bm(t){let{currentPage:r,space:e}=t,n=oe(),o=ar(tt(br),Ee.useState(!1)),{sidebarMobileLeft:i,showOverlay:a}=rl(o),[s,l]=_(Lb);Ee.useEffect(()=>{o.close()},[r==null?void 0:r.key]);let u=!e.hideTrademark;return Ee.createElement(yt,null,Ee.createElement(Ib,{style:[l.sidebar,{left:i}],mobileStyle:"visible",desktopStyle:"hidden"},Ee.createElement(bt,{tag:"nav",accessibilityLabel:n("table_of_contents"),style:[h.directionColumn,h.flex1]},Ee.createElement(b,{style:h.flex1},Ee.createElement(pi,{...t}),Ee.createElement(b,{style:[d.Padding.mediumLeft,h.flex1,l.sidebarWrapper]},Ee.createElement(di,{...t,showingTrademark:u}))),u?Ee.createElement(Vr,{floating:!0,space:e}):null)),Ee.createElement(Db,{style:[l.screenOverlay,{backgroundColor:i.interpolate({inputRange:[-Kn.MOBILE_WIDTH,0],outputRange:[s.colors.backdrop.transparent,s.colors.backdrop.background]})}],mobileStyle:a?"visible":"hidden",desktopStyle:"hidden",onPress:o.closeMobile}))}var ym=10,Lb=A.create({sidebar:t=>({backgroundColor:t.colors.background.main,width:Kn.MOBILE_WIDTH,maxWidth:"100%",height:"100%",flexDirection:"row",position:"fixed",top:0,bottom:0,zIndex:ym}),sidebarWrapper:t=>({borderRightWidth:1,borderRightColor:t.colors.border.mid}),sidebarCloseButton:{position:"absolute",width:O.BUTTON_M,height:O.BUTTON_M,top:(O.M-O.BUTTON_M)/2,left:Kn.MOBILE_WIDTH+O.BUTTON_M/2},screenOverlay:{position:"absolute",top:0,bottom:0,left:0,right:0,zIndex:ym-1}});function Sm(t){return Hr.createElement(Hr.Fragment,null,Hr.createElement(vm,{...t}),Hr.createElement(bm,{...t}))}var Ps=150,Ab=200,Mb=150;function hi(t){let[,r]=_(wm);return er.createElement(D.View,{style:r.wrapper,mobileStyle:[r.wrapperMobile,d.Margin.smallVertical,d.Margin.smallHorizontal],desktopStyle:[r.wrapperDesktop,d.Margin.smallVertical,d.Margin.xsmallHorizontal]},er.createElement(On,null,t.children))}function gi(t){let{title:r,kind:e="default",active:n=!1,onPress:o,isLast:i}=t,[a,s]=_(wm),[,l]=_(K);return er.createElement(te.TouchableOpacity,{hoverStyle:s.menuItemHovered,style:[s.menuItem,d.Padding.xsmallVertical,d.Padding.smallHorizontal,i?null:d.Margin.xsmallBottom,n?{backgroundColor:ui(a)}:null],onPress:o},er.createElement(b,{style:[h.directionRow,h.alignCenter,h.justifySpaceBetween]},er.createElement(te.Text.Child,{hoverStyle:n?null:l.textStandout,style:[l.Label,e==="link"?l.SemiBold:null,...n?[l.primary,l.Bold]:[l.text]],numberOfLines:2,ellipsizeMode:"tail"},r),er.createElement(b,{style:[d.Margin.mediumLeft]},t.rightElement)))}var wm=A.create({wrapper:t=>({backgroundColor:t.colors.background.main}),wrapperDesktop:{minWidth:Ps,maxWidth:Ab,maxHeight:Mb},wrapperMobile:{width:"auto",maxWidth:"100%",maxHeight:"100%"},menuItem:t=>({borderRadius:t.radiuses.large}),menuItemHovered:t=>({backgroundColor:t.colors.background.muted})});c();var Pe=P(x());Y();function mi(t){let{headerTheme:r,currentPage:e,collection:n,variants:o,currentVariant:i,revision:a}=t,{getNavigationLinkProps:s}=wt(),l=oe(),u=Pe.useRef(null),[,f]=_(K),p=Pe.useMemo(()=>e?At(a,e.key):"",[e]);return Pe.createElement(Ec,{ref:u,fixed:!0,wrapper:Un,closeOnClick:!0,closeOnOutsideClick:!0,anchor:({ref:m,toggle:v,opened:T})=>{let g=T?z.ChevronUp:z.ChevronDown;return Pe.createElement(ge,{ref:m,size:"medium",rightIcon:g,kind:r==="bold"?"default_bold":"default",alignItems:"start",onPress:v,style:[d.Padding.noneHorizontal]},Pe.createElement(b,{style:[Cm.variantsPicker]},Pe.createElement(ee,{numberOfLines:1,ellipsizeMode:"tail"},i.publishedTitle||i.title||Mt)))}},Pe.createElement(zn,{kind:"menu",preferredAlignment:"start"},Pe.createElement(Pe.Suspense,{fallback:Pe.createElement(vt,{size:"small"})},Pe.createElement(hi,null,o.map((m,v,T)=>Pe.createElement(gi,{key:m.key,title:m.title,active:m.key===i.key,isLast:v===T.length-1,rightElement:m.key===n.primarySpace?Pe.createElement(ee,{style:[f.textMuted,f.Uppercase,Cm.mainLabel]},l("main")):null,...s({screen:{space:m.key,page:p}},()=>{var g;(g=u.current)==null||g.close()})}))))))}var Cm=pe.create({mainLabel:{letterSpacing:1.2},variantsPicker:{maxWidth:Ps/2}});var{PAGE_BODY_DESKTOP_H_PADDING:Nb,TOC_DESKTOP_WIDTH:Vb}=sr,vi=O.XL,Tm=O.L,Hb=D.createResponsiveComponent(ge),Fb=D.createResponsiveComponent(bt);function Rm(t){let{space:r}=t,e=En(r.headerTheme,r.themeMode),n=Vn();Xb(e);let o=N.useMemo(()=>hd(n,e,r.primaryColor),[e,r.primaryColor,n]);return N.createElement(lt,{theme:o},r.headerTheme==="none"?N.createElement(D.View,{desktopStyle:"hidden",mobileStyle:"visible"},N.createElement(Pm,{...t,headerTheme:e})):N.createElement(Pm,{...t,headerTheme:e}))}function Pm(t){let{space:r,headerTheme:e,revision:n,collection:o,collectionSpaces:i,currentPage:a}=t,[,s]=_(Ub[e]),l=ar(tt(br),N.useState(!1)),f=Lt(a)==="docs",p=[_t.searchWrapper,d.Padding.largeLeft,d.Padding.smallRight];return N.createElement(N.Fragment,null,N.createElement(Fb,{tag:"header",desktopStyle:_t.desktopHeight,mobileStyle:_t.mobileHeight,style:[s.spaceHeader,h.directionRow,h.alignCenter]},N.createElement(lm,{style:h.alignCenter},f?N.createElement(Hb,{desktopStyle:"hidden",mobileStyle:"visible",icon:z.Menu,style:d.Margin.smallRight,kind:"grey",rounded:!0,title:l.opened?"Hide Table of Content":"Show Table of Content",onPress:l.toggle}):null,N.createElement(li,{space:r,collection:o,mobileStyle:[_t.autoWidth,d.Padding.noneLeft,d.Padding.mediumRight,h.flexShrink1,h.justifyContentStart,f?null:d.Margin.smallLeft],desktopStyle:[_t.autoWidth,d.Padding.mediumLeft,d.Padding.largeRight,h.justifyContentStart]}),i&&(o==null?void 0:o.publishingType)==="variants"?N.createElement(D.View,{mobileStyle:"hidden",desktopStyle:"visible"},N.createElement(mi,{key:"variants-picker",headerTheme:e,currentPage:a,collection:o,revision:n,variants:i,currentVariant:r})):null,N.createElement(Bb,{space:r,revision:n}),N.createElement(D.View,{mobileStyle:"hidden",desktopStyle:"visible",style:[p,_t.searchBarContainer,h.flex1]},N.createElement(ci,{headerTheme:e})),N.createElement(D.View,{mobileStyle:"visible",desktopStyle:"hidden",style:[p]},N.createElement(um,{headerTheme:e})))),N.createElement(D.View,{mobileStyle:"visible",desktopStyle:"hidden"},N.createElement(lt,{theme:In(r)},N.createElement(zb,{space:r,revision:n}))))}function Bb(t){let{space:r,revision:e}=t;return N.createElement(D.View,{style:[h.directionRow,h.justifyContentEnd,h.alignCenter,h.flex1,d.Padding.mediumLeft],mobileStyle:"hidden"},(r.headerLinks||[]).map((n,o,i)=>n.title?N.createElement(Wb,{space:r,revision:e,headerLink:n}):null))}function Wb(t){let{headerLink:r,space:e,revision:n}=t,o=te.useInteractiveState({hoverDelay:250}),i=te.useInteractiveState(),a=s=>{var l;return N.createElement(an,{ref:s.ref,style:[d.Padding.mediumHorizontal],kind:((l=t.space)==null?void 0:l.headerTheme)==="bold"?"bold":"default",title:r.title,contentRef:r.to,space:e,revision:n,...s.events})};return r.links&&r.links.length>0?N.createElement(_c,{fixed:!0,opened:o.hovered||i.hovered,wrapper:Un,anchor:({ref:s})=>a({ref:s,events:o.events})},N.createElement(zn,{kind:"menu",preferredAlignment:"start"},N.createElement(b,{...i.events},N.createElement(hi,null,r.links.map((s,l,u)=>N.createElement(jb,{key:l,link:s,revision:n,isLast:l===u.length-1})))))):a({})}function jb(t){let{link:r,revision:e,isLast:n}=t,o=cr(r.to,{space:e.space,revision:e.key});return N.createElement(gi,{kind:"link",title:r.title,isLast:n,onPress:i=>{i.nativeEvent.metaKey||i.nativeEvent.ctrlKey||(i.preventDefault(),o.open())}})}function zb(t){let{space:r,revision:e}=t,[n,o]=N.useState(!1),[,{headerLinksMobile:i}]=_(Gb),a=n?z.ChevronDown:z.ChevronRight;return!r.headerLinks||r.headerLinks.length===0?null:N.createElement(b,{style:[_t.headerLinksMobile,i,h.justifyContentCenter,d.Padding.medium]},N.createElement(b,{style:[_t.headerLinksMobileButton]},N.createElement(ge,{size:"large",rightIcon:a,alignItems:"start",onPress:()=>o(s=>!s),style:[d.Padding.noneHorizontal]},"Links")),n?N.createElement(b,null,r.headerLinks.map((s,l,u)=>s.title?N.createElement(xm,{space:r,revision:e,link:s,isLast:l===u.length-1}):null)):null)}function xm(t){var u;let{link:r,space:e,revision:n,isLast:o}=t,[i,a]=N.useState(!1),s="links"in r?r.links||[]:[],l=i?z.ChevronDown:z.ChevronRight;return N.createElement(b,{style:[h.directionColumn]},N.createElement(b,{style:[h.directionRow,h.alignCenter]},N.createElement(an,{style:[d.Padding.smallTop,o?null:d.Padding.smallBottom],kind:((u=t.space)==null?void 0:u.headerTheme)==="bold"?"bold":"default",title:r.title,contentRef:r.to,space:e,revision:n}),s.length>0?N.createElement(ge,{size:"large",kind:"link",rightIcon:l,alignItems:"start",onPress:()=>a(f=>!f),style:[d.Padding.noneHorizontal]}):null),i?N.createElement(b,{style:[d.Margin.smallLeft,d.Margin.smallBottom]},s.map((f,p,m)=>N.createElement(xm,{key:p,space:e,revision:n,link:f,isLast:p===m.length-1}))):null)}var Ub={none:A.create({spaceHeader:t=>({borderBottomWidth:1,borderBottomColor:t.colors.border.mid,backgroundColor:t.colors.background.main,zIndex:1})}),light:A.create({spaceHeader:t=>({borderBottomWidth:1,borderBottomColor:t.colors.border.mid,backgroundColor:t.colors.background.main,zIndex:1,position:"sticky",top:0})}),dark:A.create({spaceHeader:t=>({borderBottomWidth:1,borderBottomColor:t.colors.border.mid,backgroundColor:t.colors.background.main,zIndex:1,position:"sticky",top:0})}),bold:A.create({spaceHeader:t=>({borderBottomWidth:1,borderBottomColor:t.colors.primary.main,backgroundColor:t.colors.primary.main,zIndex:1,position:"sticky",top:0})})},Gb=A.create({headerLinksMobile:t=>({backgroundColor:t.colors.background.main,borderBottomWidth:1,borderBottomColor:t.colors.border.main})}),_t=pe.create({searchWrapper:{marginLeft:"auto"},searchBarContainer:{maxWidth:225},autoWidth:{width:"auto"},tocDesktop:{width:Vb},headerLinks:{paddingHorizontal:Nb-d.medium},headerLinksMobile:{minHeight:O.M},headerLinksMobileButton:{marginRight:"auto"},mobileHeight:{height:Tm},desktopHeight:{height:vi}});function Xb(t){let e=ir()==="mobile";or(()=>{if(t!=="none"){let n=document.getElementsByTagName("html")[0];n.style.scrollPaddingTop=`${e?Tm:vi}px`}},[t])}c();var ve=P(x());c();var Ie=P(x());Y();c();var qe=P(x());Y();function Ts(t){let{active:r,tooltip:e,rating:n,onPress:o}=t;return qe.createElement(Zc,{tooltip:e},(i,a)=>qe.createElement(He,{ref:a,onPress:()=>o(n),style:[d.Margin.smallLeft],accessibilityLabel:e,...i.events},qe.createElement(om,{active:r,interactive:!0,rating:n,size:O.BUTTON_S})))}var Kb=A.create({footer:t=>({borderTopColor:t.colors.border.mid,borderTopWidth:1})});c();var Ye=P(x());Y();var qb=te.createInteractiveComponent(Dc),Yb={[qs]:null,[Ys]:d.Margin.smallLeft,[Js]:null},_m=Ye.memo(function(r){let{sections:e,activeSection:n}=r,[,o]=_(K),[,i]=_(Em),a=oe();return Ye.createElement(b,{style:[i.pageOutline]},Ye.createElement(b,{style:[h.directionRow,h.alignCenter,d.Padding.largeHorizontal,d.Margin.smallBottom]},Ye.createElement(ee,{style:[o.GroupTitle,o.textMuted,o.Bold]},a("outline"))),e.map(s=>s.type===null||s.type===$s?null:Ye.createElement($b,{key:s.key,section:s,active:n===s.key})))});function $b(t){let{section:r,active:e}=t,[,n]=_(K),[,o]=_(Em),{navigateToHash:i}=wt();return Ye.createElement(te.TouchableOpacity,{style:[h.directionRow,d.Padding.largeHorizontal,o.sectionItem,e&&o.sectionItemActive],onPress:()=>{i(r.anchor)}},r.tag?Ye.createElement(ht,{backgroundColor:El[r.tag]||ct.orange.base,style:[o.sectionTag,d.Margin.xsmallRight,h.alignSelfCenter]},Ye.createElement(ee,{style:[n.textInsideColor,n.MobileCaption,n.Bold,n.Uppercase]},r.tag)):null,Ye.createElement(qb.Child,{style:[n.Label,n.textMid,r.type&&Yb[r.type],...e?[n.primary,n.Medium]:[]],hoverStyle:n.primary},r.title))}var Em=A.create({pageOutline:t=>({maxWidth:sr.MAX_PAGE_OUTLINE_WIDTH}),sectionItem:{marginTop:d.xsmall,marginBottom:d.xsmall,marginLeft:-1,borderLeftWidth:3,borderLeftColor:"transparent",width:"fit-content",maxWidth:"100%"},sectionItemActive:t=>({borderLeftColor:t.colors.primary.main}),sectionTag:{borderRadius:O.XXS,height:O.XXS,paddingHorizontal:d.small,justifyContent:"center"}});var Jb=A.create({spacePageBody:{flex:1}});function Zb(t,r,e){let n=t.space;return n+=`/${t.changeRequest||"main"}`,n+=`/${r.conflicts?"conflicts":"normal"}`,n+=`/${e.key}`,t.diff&&(n+="/diff"),t.revision&&(n+="/revision"),n}function Qb(t,r,e){let n=e&&r.rootPages[0]!==e.key?`/page/${e.key}`:"",o=`color=${encodeURIComponent(t.primaryColor||"")}&logo=${encodeURIComponent(Ni(t.logoURL||t.iconURL||""))}&theme=${encodeURIComponent(t.headerTheme||"")}`;return`https://${Qe.firebase.authDomain}/share/space/thumbnail/${t.key}${n}.png?${o}`}function eS(t){let{space:r,assetHostname:e}=t,n=ic(r,"public-content"),[o]=_(),[i,a]=ve.default.useState(n.iconURL||(n.emoji?`${e}${oc(n.emoji)}`:null));return ve.default.useEffect(()=>{if(i)return;let s=192,l=document.createElement("canvas"),u=l.getContext("2d");if(!u)return;l.width=s,l.height=s,u.fillStyle=o.colors.background.main,u.fillRect(0,0,s,s);let f=.7;u.fillStyle=o.colors.text.main,u.font=`400 ${s*f}px gitbook-content-font`,u.textAlign="center",u.fillText(r.title.slice(0,1),s/2,s*(1-f)/2),a(l.toDataURL("image/png"))},[r.title,a]),ft(s=>{s.writeAsync([{type:"link",rel:"icon",href:i?Ni(i):`${e}/public/images/icon-512.png`}])}),null}c();var W=P(x());Y();var tS=D.createResponsiveComponent(bt),Dm=200,rS=4*(Dm+d.small);function Lm(t){let{space:r,collection:e,revision:n}=t,[,o]=_(K),[,i]=_(iS),a=W.useMemo(()=>(r==null?void 0:r.footer)||(e==null?void 0:e.footer),[r,e]);return W.createElement(W.Fragment,null,a?W.createElement(tS,{tag:"footer",style:[h.alignCenter,i.footer]},W.createElement(D.View,{desktopStyle:[Et.desktopContainer]},W.createElement(D.View,{desktopStyle:h.directionRow,mobileStyle:h.directionColumn},a!=null&&a.logoURL?W.createElement(D.View,{style:[h.directionRow,h.alignStart,d.Padding.xlargeTop,a!=null&&a.copyright?null:d.Padding.xlargeBottom],desktopStyle:d.Margin.xxlargeHorizontal,mobileStyle:d.Margin.largeHorizontal},W.createElement(D.View,{desktopStyle:"visible",mobileStyle:"hidden"},W.createElement(Ii,{source:{uri:a==null?void 0:a.logoURL},style:{width:150,height:150},resizeMode:"contain"})),W.createElement(D.View,{desktopStyle:"hidden",mobileStyle:"visible"},W.createElement(b,{style:d.Margin.largeLeft},W.createElement(Ii,{source:{uri:a==null?void 0:a.logoURL},style:{width:30,height:30},resizeMode:"contain"})))):null,a!=null&&a.linkGroups?W.createElement(D.View,{style:[d.Padding.xlargeTop,a.logoURL?h.alignStart:h.alignCenter,h.flex1,a!=null&&a.copyright?null:d.Padding.xlargeBottom],mobileStyle:h.alignStart,tabletStyle:d.Padding.largeLeft},W.createElement(D.View,{mobileStyle:"hidden",tabletStyle:"hidden",desktopStyle:a.linkGroups.length<3&&!a.logoURL?"visible":"hidden"},W.createElement(nS,{linkGroups:a.linkGroups,revision:n})),W.createElement(D.View,{mobileStyle:"visible",tabletStyle:"visible",desktopStyle:a.linkGroups.length>=3||a.logoURL?"visible":"hidden"},W.createElement(oS,{linkGroups:a.linkGroups,revision:n}))):null),a!=null&&a.copyright?W.createElement(D.View,{style:[h.flex1,d.Padding.xlargeVertical]},W.createElement(ee,{style:[Et.copyright,o.textMuted]},a==null?void 0:a.copyright)):null)):null)}function nS(t){let{linkGroups:r,revision:e}=t,[,n]=_(K),o=[],i=r==null?void 0:r.map(({title:a})=>a);return r==null||r.forEach(a=>{var s;(s=a==null?void 0:a.links)==null||s.forEach((l,u)=>{if(o[u]===void 0)return o[u]=[l];o[u].push(l)})}),W.createElement(b,{style:[h.flex1,h.justifyContentStart,h.directionRow]},W.createElement(b,{style:Et.linkGroupColumnDesktop},W.createElement(b,{style:[h.flex1]},i==null?void 0:i.map((a,s)=>W.createElement(b,{key:a,style:[h.alignStart,s>0?d.Margin.smallTop:null]},W.createElement(ee,{style:[n.text,n.Heading3]},a))))),o.map((a,s)=>W.createElement(b,{key:s,style:Et.linkGroupColumnDesktop},W.createElement(Am,{links:a,revision:e,renderMode:"horizontal"}))))}function oS(t){let{linkGroups:r,revision:e}=t,[,n]=_(K);return W.createElement(D.View,{style:[h.flex1,h.justifyContentStart,h.directionRow],desktopStyle:[Et.linkGroupColumnsDesktop,h.directionRow,h.wrap,h.flexShrink1],mobileStyle:h.directionColumn},r.map((o,i)=>W.createElement(D.View,{key:i,desktopStyle:[Et.linkGroupColumnDesktop,d.Margin.xlargeTop],mobileStyle:[Et.linkGroupColumnMobile,d.Margin.xlargeTop,d.Margin.largeLeft]},W.createElement(b,{style:h.alignStart},W.createElement(ee,{style:[n.text,n.Heading3]},o.title)),W.createElement(Am,{links:o.links,revision:e,renderMode:"vertical"}))))}function Am(t){let{links:r,renderMode:e}=t,[,n]=_(K);return W.createElement(D.View,{style:[h.alignStart,h.flex1,h.directionColumn],desktopStyle:e==="vertical"?d.Margin.largeTop:null,mobileStyle:d.Margin.smallTop},(r||[]).map((o,i)=>{let a=i===r.length-1;return o.title?W.createElement(W.Suspense,{fallback:null,key:o.title},W.createElement(b,{style:[Et.referenceLink,e==="horizontal"&&i>0?d.Margin.smallTop:null]},W.createElement(an,{title:o.title,contentRef:o.to,style:[n.textMuted,n.Medium,e==="horizontal"?null:[d.Padding.smallTop,a?null:d.Padding.smallBottom]],...t}))):null}))}var iS=A.create({footer:t=>({backgroundColor:t.colors.background.mid})}),Et=pe.create({linkGroupColumnsDesktop:{maxWidth:rS,marginTop:-d.xlarge},linkGroupColumnDesktop:{width:Dm,marginLeft:d.small,paddingRight:d.xlarge},linkGroupColumnMobile:{width:"auto"},desktopContainer:{maxWidth:1280,width:"100%"},copyright:{textAlign:"center"},mobileHeight:{height:"auto"},referenceLink:{maxWidth:"100%"}});c();var _e=P(x());c();var wn=P(x());c();function Mm(t,r){let{navigate:e}=wt();Uc(()=>[aS(t,r,e)],[t,r,e])}function sS(t,r){let e=new Map;return r.forEach(n=>{if(n.index!=="pages"&&n.index!=="sections")return null;let o=t.pages[n.object.page];if(!o)return null;let i=e.get(o.key)||{sections:[],score:0};n.index==="sections"?(i.sections.push(n.object),i.score+=1):(i.result=n.object,i.score+=3),e.set(o.key,i)}),Array.from(e.entries()).map(([n,{score:o,sections:i,result:a}])=>{let s=t.pages[n];return s?{page:s,score:o,sections:i,result:a}:null}).filter(Ai).sort((n,o)=>o.score-n.score)}function Nm(t){let{space:r,revision:e}=t,n=oe(),[,{open:o}]=Ft(),i=Nn();return Mm(r,e),Jn({[$n.PALETTE_OPEN]:()=>{o()},"/":()=>{o()}},["all"],[]),Gc({search:n("search_placeholder"),variants:{color:i.color}}),wn.createElement(wn.Fragment,null,wn.createElement(gs,null))}c();var yi=P(x());var Fr=new Map;typeof window<"u"&&(window.GitBook=window.GitBook||{addEventListener:(t,r)=>{Fr.has(t)||Fr.set(t,[]),Fr.get(t).push(r)},removeEventListener:(t,r)=>{if(!Fr.has(t))return;let e=Fr.get(t),n=e.indexOf(r);n!==-1&&e.splice(n,1)}});function Vm(t,...r){let e=Fr.get(t);!e||e.forEach(n=>{n(...r)})}function Hm(t){if(yi.useContext(St).mode!=="public-content")throw new Error("useInjectIntegrationsScripts can only be used in public-content mode");yi.useEffect(()=>(Vm("load"),()=>{Vm("unload")}),[t.key])}function bi(t){let{space:r,assetHostname:e,collection:n,collectionSpaces:o,usesCookies:i}=t,{locale:a}=_e.useContext(St),{screen:s}=Yn(),l=Bl(),u=Pl({space:r.key,revision:(s.type==="space"?s.revision:null)||r.revision});if(!u)throw new Error("Revision not found");zf(r),Hm(r);let f=_e.useMemo(()=>An(r,{}),[r.key,r.organization,r.collection]);if(s.type!=="space"||s.space!==r.key)throw new Error("screen should be the space we render");_e.useEffect(()=>{if(!!r.searchKey)return Cl(r.searchKey)},[r.searchKey]),ft(v=>{v.write({type:"font",font:r.font||"Inter",fontFamilyName:"gitbook-content-font"}),s.revision&&v.write({type:"meta",name:"robots",content:"noindex"}),v.setLang(a)}),sm(r.privacyPolicyURL,na(r)||i);let[p,m]=dl(u,s);return _e.createElement(_e.Fragment,null,_e.createElement(Rm,{space:r,revision:u,collection:n,currentPage:m,collectionSpaces:o}),_e.createElement(Im,{space:r,revision:u,screen:s,collection:n,collectionSpaces:o,assetHostname:e,currentPage:m,screenUpdate:p,scrollRef:l}),_e.createElement(Lm,{space:r,revision:u,collection:n}),_e.createElement(Nm,{space:r,revision:u}),_e.createElement(nm,null))}c();var Rs=P(x());c();function Cn(t){return t?t.endsWith("/")?t:`${t}/`:""}function Fm(t){return r=>{let e=`/${Cn(t.basePath)}`;switch(r.type){case"back_office":case"account":case"error_notfound":case"org_invite":case"org_join":case"org_settings":case"quickstart":case"root":case"join":case"account_verification":case"integrations":case"import":case"template":case"welcome":case"discover":case"contentkit_builder":throw new Error(`Cannot navigate to ${r.type} on public content`);case"home":{if(r.organization){let o=Bt.read({type:"organization",organization:r.organization});e=jr(o);break}throw new Error("Cannot navigate to home without an org on public content")}case"user":{let o=Bt.read({type:"user",user:r.user});e=jr(o);break}case"collection":{let o=Bt.read({type:"collection",collection:r.collection});e=jr(o);break}case"space":{let o=Bt.read({type:"space",space:r.space});o.hostname===t.hostname&&(!t.basePath||o.pathname.startsWith(t.basePath))?(t.shareLink&&(e+=Cn(t.shareLink)),o.pathname!==t.basePath&&(t.basePath?e+=Cn(Us(o.pathname,Cn(t.basePath))):e+=Cn(o.pathname))):e=jr(o),e+=cS(r);break}case"legacy_space":case"legacy_account":throw new Error("Cannot navigate to legacy urls");default:rr(r)}let n;if(typeof r.query=="string"){let o=new URLSearchParams;o.set("q",r.query),n=`?${o.toString()}`}return{pathname:e,hash:r.hash,search:n}}}function cS(t){let r="";return t.revision&&(r+=`~/revisions/${t.revision}/`),r+=`${t.page[0]==="/"?t.page.slice(1):t.page}`,t.sideSheet&&(r+=`${r[r.length-1]==="/"?"":"/"}~/${t.sideSheet}`),r}c();function Bm(t,r,e,n=[]){return o=>{let{spaceKey:i,pathname:a}=Gs({currentSpaceKey:r,collectionSpaces:n,collection:e,pathname:o.pathname,paths:t}),s={type:"space",space:i,page:""};lS(s,ec(a)),o.hash&&(s.hash=o.hash.replace(/^#/,""));let u=new URLSearchParams(o.search).get("q");return typeof u=="string"&&(s.query=u),s}}function lS(t,r){tc(r,[{path:`/~/revisions/:revision/:page${Mi}`,onMatch:e=>{Object.assign(t,{page:e.params.page,revision:e.params.revision})}},{path:"/~/revisions/:revision",onMatch:e=>{Object.assign(t,{revision:e.params.revision,page:""})}},{path:`/:page${Mi}`,onMatch:e=>{Object.assign(t,{page:e.params.page,diff:!1})}},{path:"/",onMatch:e=>{Object.assign(t,{diff:!1,page:""})}}])}function Si(t,r,e,n){let o=Bf(),i=(0,Rs.useMemo)(()=>Bm(t,r,e,n),[t.hostname,t.basePath,t.shareLink,r,e,n]),a=(0,Rs.useMemo)(()=>Fm(t),[t.hostname,t.basePath,t.shareLink]);return{forceHardNavigation:!o,getNavigationScreenFromLocation:i,getLocationForNavigationScreen:a}}function Wm(t){let{space:r,ssrRequestPath:e,ssrRouterContext:n,basePath:o,hostname:i,customToken:a,shareLink:s,assetHostname:l,preview:u=!1,usesCookies:f=!1}=t,p=Si({hostname:i,basePath:o,shareLink:s},r.key);return Me.createElement(qr,{mode:"public-content",preview:u,locale:r.language},Me.createElement(Vt,{primaryColor:r.primaryColor},Me.createElement(yn,null,Me.createElement(ai,{ssrRequestPath:e,ssrRouterContext:n},Me.createElement(qn,{persist:!1,...p},Me.createElement(Me.Suspense,{fallback:Me.createElement(vt,{size:"large"})},Me.createElement(co,null,a&&typeof window>"u"?Me.createElement(vt,{size:"large"}):Me.createElement(bi,{space:r,assetHostname:l,usesCookies:f}))))))))}c();var Te=P(x());function jm(t){let{collection:r,basePath:e,hostname:n,customToken:o,collectionSpaces:i,ssrRequestPath:a,ssrRouterContext:s,shareLink:l,assetHostname:u,preview:f=!1,usesCookies:p=!1}=t,m=Si({hostname:n,basePath:e,shareLink:l},void 0,r,i);if(!f&&r.publishingType!=="variants")throw new Error("we do not know how to render anything else than variants for now");return Te.createElement(qr,{mode:"public-content",preview:f,locale:r.language},Te.createElement(Vt,{primaryColor:r.primaryColor},Te.createElement(yn,null,Te.createElement(ai,{ssrRequestPath:a,ssrRouterContext:s},Te.createElement(qn,{persist:!1,...m},Te.createElement(Te.Suspense,{fallback:Te.createElement(vt,{size:"large"})},Te.createElement(co,null,o&&typeof window>"u"?Te.createElement(vt,{size:"large"}):Te.createElement(uS,{collection:r,collectionSpaces:i,assetHostname:u,usesCookies:p}))))))))}function uS(t){let{screen:r}=Yn();if(r.type!=="space")throw new Error("screen should be a space");let[e]=bl([Dn(r.space)]);if(!e)throw new Error("the space should exist");return Te.createElement(qr,{locale:e.language},Te.createElement(Vt,{primaryColor:e.primaryColor},Te.createElement(yn,null,Te.createElement(bi,{...t,space:e}))))}c();var st=P(x());Y();c();var tr=P(x());var xs=Fe("preview:child");function zm(t,r){let[e,n]=tr.useState(t),[o,i]=tr.useState(void 0);return fS(e.footer),tr.useEffect(()=>{!r||(window.addEventListener("message",a=>{if(a.data.source!=="gitbook-preview-parent"||(xs.info("receive message",a.origin,a.data),a.origin!=="http://localhost:5000"&&a.origin!=="http://localhost:5001"&&a.origin!==`https://${Qe.firebase.authDomain}`))return;let s=zs(a.data.payload),l=a.data.previewID;xs.debug("update content with",s),n(s),i(l),window.parent.postMessage({source:"gitbook-preview-child"},"*")}),xs.info("notify parent that we are ready"),window.parent.postMessage({source:"gitbook-preview-child"},"*"))},[r]),[e,o]}function fS(t){let r=tr.useRef(t);or(()=>{t&&t!==r.current&&window.scrollTo({left:0,top:document.body.scrollHeight,behavior:"smooth"}),r.current=t},[t])}c();var Um=P(x());function Gm(){Um.useEffect(()=>{typeof window>"u"},[])}function Os(t){let r="collection"in t?t.collection:t.space,[e,n]=zm(r,!!t.preview);Gm();let o=In(e);return st.createElement(ac,null,st.createElement(lt,{theme:o},st.createElement(gc,{theme:o},st.createElement(md,null,st.createElement(su,null,st.createElement(wc,{enabled:!0},"collection"in t?st.createElement(jm,{...t,collection:e}):st.createElement(Wm,{...t,space:e})),n?st.createElement(b,{testID:n}):null)))))}c();function Xm(t){t!=null&&t.firestore&&Fi.fromJS(t.firestore),t!=null&&t.head&&$c.cache.fromJS(t.head),t!=null&&t.images&&(cl.fromJS(t.images.sizes),Oc.fromJS(t.images.uri)),t!=null&&t.contentURLs&&Bt.fromJS(t.contentURLs),t!=null&&t.contentRefs&&kl.fromJS(t.contentRefs),t!=null&&t.screenToContentRefs&&_l.fromJS(t.screenToContentRefs),t!=null&&t.swaggers&&Il.fromJS(t.swaggers)}c();var Km=P(ih());function ks(t){return new Wr("ssr.deserializeFromHTML").wrapSync(()=>{let e=Km.default.decompress(t);return e?JSON.parse(e):null})}c();var qm=Fe("browser-compatibility");function Ym(){let t=["webcache.googleusercontent.com","translate.googleusercontent.com","translate.google.com"];return!window.location.hostname||t.includes(window.location.hostname)?(qm.warning("The application is served over an unsupported hostname and has been made static."),!1):dS()?!0:(qm.warning("Your browser is missing required features, the application has been made static."),!1)}function dS(){try{if("\u212B".normalize("NFKD")!=="A\u030A")return!1}catch(t){return!1}return!(!window.Intl||![].flat)}c();function $m(t){document.readyState==="interactive"||document.readyState==="complete"?t():document.addEventListener("DOMContentLoaded",()=>{t()})}Ym()&&$m(()=>{pS()});async function pS(){let t=new URLSearchParams(window.location.search);if(t.has("jwt_token")){t.delete("jwt_token");let s=t.toString();window.history.propertyIsEnumerable({},"",`${window.location.pathname}${s?`?${s}`:""}`)}let{dsn:r,tracesSampling:e}={...Qe.sentry,...Qe.sentry.publicContent};Hs({dsn:r,release:Ds,projectId:Qe.firebase.projectId,tracesSampling:e});let n=window.__GITBOOK_INITIAL_PROPS__,o=ks(n);window.location.hostname!=="localhost"&&rc(o.hostname),Ji({customToken:o.customToken,waitUserReady:!1}),window.__GITBOOK_LAZY_MODULES__&&await nl(window.__GITBOOK_LAZY_MODULES__);let i=window.__GITBOOK_INITIAL_STATE__,a=ks(i);a?(Xm(a),Di.registerComponent("PublicContentApplication",()=>Os),Di.runApplication("PublicContentApplication",{hydrate:!0,rootTag:document.querySelector(".gitbook-root"),initialProps:o})):console.error("Invalid state received from server, content won't be interactive")}
/** @license React v0.0.0-experimental-4ead6b530
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
//# sourceMappingURL=https://app.gitbook.com/public/app/public-NBJ6HEFK.min.js.map