string | | Name of the element |
+| toName | string | | Name of the image to label |
+| [opacity] | float | 0.6 | Opacity of Cube |
+| [fillColor] | string | | Cube fill color in hexadecimal |
+| [strokeColor] | string | "#f48a42" | Stroke color in hexadecimal |
+| [strokeWidth] | number | 1 | Width of the stroke |
+| [canRotate] | boolean | true | Whether to show or hide rotation control |
+| [smart] | boolean | | Show smart tool for interactive pre-annotations |
+| [smartOnly] | boolean | | Only show smart tool for interactive pre-annotations |
+
+### Example
+
+Basic labeling configuration for adding rectangular bounding box regions to an image
+
+```html
+string | | Name of the element |
+| toName | string | | Name of the image to label |
+| [choice] | single \| multiple | single | Configure whether you can select one or multiple labels |
+| [maxUsages] | number | | Maximum number of times a label can be used per task |
+| [showInline] | boolean | true | Show labels in the same visual line |
+| [opacity] | float | 0.6 | Opacity of Cube |
+| [fillColor] | string | | Cube fill color in hexadecimal |
+| [strokeColor] | string | | Stroke color in hexadecimal |
+| [strokeWidth] | number | 1 | Width of stroke |
+| [canRotate] | boolean | true | Show or hide rotation control |
+
+### Sample Results JSON
+
+| Name | Type | Description |
+| --- | --- | --- |
+| original_width | number | width of the original image (px) |
+| original_height | number | height of the original image (px) |
+| image_rotation | number | rotation degree of the image (deg) |
+| value | Object | |
+| value.x | number | x coordinate of the top left corner before rotation (0-100) |
+| value.y | number | y coordinate of the top left corner before rotation (0-100) |
+| value.width | number | width of the bounding box (0-100) |
+| value.height | number | height of the bounding box (0-100) |
+| value.rotation | number | rotation degree of the bounding box (deg) |
+
+### Example JSON
+```json
+{
+ "original_width": 1920,
+ "original_height": 1280,
+ "image_rotation": 0,
+ "value": {
+ "x": 3.1,
+ "y": 8.2,
+ "width": 20,
+ "height": 16,
+ "rectanglelabels": ["Car"]
+ }
+}
+```
+
+### Example
+
+Basic labeling configuration for applying labels to rectangular bounding boxes on an image
+
+```html
+string | | Name of the element |
+| value | string | | Data field containing a path or URL to the object3d |
+| [valueList] | string | | References a variable that holds a list of object3d URLs |
+| [smoothing] | boolean | | Enable smoothing, by default it uses user settings |
+| [width] | string | "100%" | Object3D width |
+| [maxWidth] | string | "750px" | Maximum object3d width |
+| [zoom] | boolean | false | Enable zooming an object3d with the mouse wheel |
+| [negativeZoom] | boolean | false | Enable zooming out an object3d |
+| [zoomBy] | float | 1.1 | Scale factor |
+| [grid] | boolean | false | Whether to show a grid |
+| [gridSize] | number | 30 | Specify size of the grid |
+| [gridColor] | string | "#EEEEF4" | Color of the grid in hex, opacity is 0.15 |
+| [zoomControl] | boolean | false | Show zoom controls in toolbar |
+| [brightnessControl] | boolean | false | Show brightness control in toolbar |
+| [contrastControl] | boolean | false | Show contrast control in toolbar |
+| [rotateControl] | boolean | false | Show rotate control in toolbar |
+| [crosshair] | boolean | false | Show crosshair cursor |
+| [horizontalAlignment] | left \| center \| right | left | Where to align object3d horizontally. Can be one of "left", "center", or "right" |
+| [verticalAlignment] | top \| center \| bottom | top | Where to align object3d vertically. Can be one of "top", "center", or "bottom" |
+| [defaultZoom] | auto \| original \| fit | fit | Specify the initial zoom of the object3d within the viewport while preserving its ratio. Can be one of "auto", "original", or "fit" |
+| [crossOrigin] | none \| anonymous \| use-credentials | none | Configures CORS cross domain behavior for this object3d, either "none", "anonymous", or "use-credentials", similar to [DOM `img` crossOrigin property](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/crossOrigin). |
+
+### Example
+
+Labeling configuration to display an object3d on the labeling interface
+
+```html
+-1.5?i({dragNode:O,dropNode:P,dropPosition:1})?C=1:I=!1:i({dragNode:O,dropNode:P,dropPosition:0})?C=0:i({dragNode:O,dropNode:P,dropPosition:1})?C=1:I=!1:i({dragNode:O,dropNode:P,dropPosition:1})?C=1:I=!1,{dropPosition:C,dropLevelOffset:k,dropTargetKey:v.key,dropTargetPos:v.pos,dragOverNodeKey:S,dropContainerKey:0===C?null:(null===(c=v.parent)||void 0===c?void 0:c.key)||null,dropAllowed:I}}function H(e,t){if(e)return t.multiple?e.slice():e.length?[e[0]]:e}function Y(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else{if("object"!==(0,i.Z)(e))return(0,m.ZP)(!1,"`checkedKeys` is not an array or an object"),null;t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0}}return t}function z(e,t){var n=new Set;function r(e){if(!n.has(e)){var o=t[e];if(o){n.add(e);var i=o.parent;o.node.disabled||i&&r(i.key)}}}return(e||[]).forEach((function(e){r(e)})),(0,l.Z)(n)}var B=n(67449),U=n(7606),J=n(39702),Q=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],q=function(e,t){var n=e.className,o=e.style,i=e.motion,a=e.motionNodes,l=e.motionType,s=e.onMotionStart,u=e.onMotionEnd,c=e.active,d=e.treeNodeRequiredProps,f=(0,w.Z)(e,Q),p=h.useState(!0),m=(0,B.Z)(p,2),g=m[0],v=m[1],x=h.useContext(b).prefixCls,S=h.useRef(!1),C=function(){S.current||u(),S.current=!0};return(0,h.useEffect)((function(){a&&"hide"===l&&g&&v(!1)}),[a]),(0,h.useEffect)((function(){return a&&s(),function(){a&&C()}}),[]),a?h.createElement(J.default,(0,r.Z)({ref:t,visible:g},i,{motionAppear:"show"===l,onAppearEnd:C,onLeaveEnd:C}),(function(e,t){var n=e.className,o=e.style;return h.createElement("div",{ref:t,className:y()("".concat(x,"-treenode-motion"),n),style:o},a.map((function(e){var t=(0,r.Z)({},e.data),n=e.title,o=e.key,i=e.isStart,a=e.isEnd;delete t.children;var l=j(o,d);return h.createElement(V,(0,r.Z)({},t,l,{title:n,active:c,data:e.data,key:o,isStart:i,isEnd:a}))})))})):h.createElement(V,(0,r.Z)({domRef:t,className:n,style:o},f,{active:c}))};q.displayName="MotionTreeNode";var $=h.forwardRef(q);function ee(e,t,n){var r=e.findIndex((function(e){return e.key===n})),o=e[r+1],i=t.findIndex((function(e){return e.key===n}));if(o){var a=t.findIndex((function(e){return e.key===o.key}));return t.slice(i+1,a)}return t.slice(i+1)}var te=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],ne={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},re=function(){},oe="RC_TREE_MOTION_".concat(Math.random()),ie={key:oe},ae={key:oe,level:0,index:0,pos:"0",node:ie,nodes:[ie]},le={parent:null,children:[],pos:ae.pos,data:ie,title:null,key:oe,isStart:[],isEnd:[]};function se(e,t,n,r){return!1!==t&&n?e.slice(0,Math.ceil(n/r)+1):e}function ue(e){return R(e.key,e.pos)}var ce=function(e,t){var n=e.prefixCls,o=e.data,i=(e.selectable,e.checkable,e.expandedKeys),a=e.selectedKeys,l=e.checkedKeys,s=e.loadedKeys,u=e.loadingKeys,c=e.halfCheckedKeys,d=e.keyEntities,f=e.disabled,p=e.dragging,m=e.dragOverNodeKey,g=e.dropPosition,v=e.motion,y=e.height,b=e.itemHeight,x=e.virtual,S=e.focusable,C=e.activeItem,k=e.focused,E=e.tabIndex,O=e.onKeyDown,P=e.onFocus,I=e.onBlur,_=e.onActiveChange,T=e.onListChangeStart,M=e.onListChangeEnd,L=(0,w.Z)(e,te),N=h.useRef(null),Z=h.useRef(null);h.useImperativeHandle(t,(function(){return{scrollTo:function(e){N.current.scrollTo(e)},getIndentWidth:function(){return Z.current.offsetWidth}}}));var V=h.useState(i),D=(0,B.Z)(V,2),A=D[0],G=D[1],W=h.useState(o),K=(0,B.Z)(W,2),X=K[0],F=K[1],H=h.useState(o),Y=(0,B.Z)(H,2),z=Y[0],J=Y[1],Q=h.useState([]),q=(0,B.Z)(Q,2),ie=q[0],ae=q[1],ce=h.useState(null),de=(0,B.Z)(ce,2),fe=de[0],he=de[1];function pe(){F(o),J(o),ae([]),he(null),M()}h.useEffect((function(){G(i);var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e.length,r=t.length;if(1!==Math.abs(n-r))return{add:!1,key:null};function o(e,t){var n=new Map;e.forEach((function(e){n.set(e,!0)}));var r=t.filter((function(e){return!n.has(e)}));return 1===r.length?r[0]:null}return n \n There was an issue loading URL from \n There was an issue loading URL from \n Also check that:\n \n There was an issue loading URL from \n Things to look out for:\n \n Technical description: 0?"in "+o:o+" ago":o};function i(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var a={date:i({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:i({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:i({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},l={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},s=function(e,t,n,r){return l[e]};function u(e){return function(t,n){var r,o=n||{};if("formatting"===(o.context?String(o.context):"standalone")&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,a=o.width?String(o.width):i;r=e.formattingValues[a]||e.formattingValues[i]}else{var l=e.defaultWidth,s=o.width?String(o.width):e.defaultWidth;r=e.values[s]||e.values[l]}return r[e.argumentCallback?e.argumentCallback(t):t]}}var c={ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:u({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:u({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:u({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:u({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:u({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function d(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;var a,l=i[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(s)?function(e,t){for(var n=0;n0&&o
${e}`,ERR_GENERAL:({value:e})=>e,URL_CORS_DOCS:"https://labelstud.io/guide/storage.html#Troubleshoot-CORS-and-access-problems",URL_TAGS_DOCS:"https://labelstud.io/tags",ERR_LOADING_AUDIO:({attr:e,url:t,error:n})=>(0,o.jsxs)("div",{"data-testid":"error:audio",children:[(0,o.jsxs)("p",{children:["Error while loading audio. Check ",(0,o.jsx)("code",{children:e})," field in task."]}),(0,o.jsxs)("p",{children:["Technical description: ",n]}),(0,o.jsxs)("p",{children:["URL: ",(0,r.htmlEscape)(t)]})]}),ERR_LOADING_S3:({attr:e,url:t})=>`\n ${e} value.\n The request parameters are invalid.\n If you are using S3, make sure you’ve specified the right bucket region name.\n ${e} value.\n Most likely that's because static server has wide-open CORS.\n Read more on that here.\n \n
\n \n \n ${e} value\n \n
\n \n ${n}\n
\n URL: ${(0,r.htmlEscape)(t)}\n -1&&e%1==0&&ee+t[1]),"");e.raws[t]={raw:r,value:c}}e[t]=c}rule(e){e.pop();let t=new s;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)n=e.pop()[1]+n;return n}stringFrom(e,t){let n="";for(let r=t;r